Author Topic: Command Help  (Read 1051 times)

Ive looked at many mods, and I cant seem to figure out where the commands are placed. Anyone have any tips or guidelines?



What command in specific are you looking for? If it's a default one like /light, you aren't going to be able to get the code for it.

Like "/stereo"
Any function prefixed with "serverCmd" will make it a server command. It also is always sent the client who typed the command as the first argument.
For example:
Code: [Select]
function serverCmdMakeMeBad(%client)
{
%client.makemebad = 1;
}

Would be called if the player typed
/makeMeBad

You can also add other arguments to the function which is how you do more complex server commands.
Again, for example:
Code: [Select]
function serverCmdMakeMeSomething(%client, %emotion)
{
if(%emotion $= "bad")
{
%client.makemebad = 1;
}
else
{
%client.makemebad = 0;
}
}
So now, you'd be typing
/makemesomething bad