Page 1 of 1

LUA/Command Help Plz!!

Posted: Thu Apr 28, 2016 9:20 pm
by Marlfox
So we're in version 0.12.29 (Build 17931, win64, steam) and not a single command on my multiplayer server is working. Am I missing something and, if so, what do I have to do to get it to work again? I want to be able to change the colors of the players on my server.

Re: LUA/Command Help Plz!!

Posted: Thu Apr 28, 2016 9:29 pm
by daniel34
You need to enable commands for multiplayer, they are disabled by default.
The checkbox is on the same screen where you set the latency and is called "Allow commands".

If you are running an actual server (using the --start-server option) they are enabled by default, unless you use the option --disable-commands.

Only the host can change this setting, and it's the same setting for all players, including the host.

Re: LUA/Command Help Plz!!

Posted: Fri Apr 29, 2016 1:09 am
by Neemys
If you have command enabled (see post before mine to enable them) it may be because command in multiplayer differ a bit from single player command.

In multiplayer as there is multiple player, you need to give the command the id of the player you want to run the command on :

Code: Select all

/c game.players[1].color={g=50,b=200,r=200,a=.9}
will change the color of the first player connected to the game. change 1 by other number to get other player. There must be another solution to get player by name but I don't know it sorry.


If you have other command to run, when you see "game.player" in single player command, in multiplayer it is "game.players[number]" (notice the s in players)


If you still struggle to get command working, give the command you try and the error message. It will be easier to help you.