Roleplay commands

Where can i find a more decent /me, /(s)hout, /do, /(l)ow or any kind of roleplay chat commands?

I found one but it doesn't explain each line. I need a tutorial where it explains for me to understand what are the cause and effect of it.

If you didn't understand, let us explain

That is the thread that i found, but if you insist on explaining it to me okay, why not.

CMD:me(playerid, params[]) // Here you begin your ZCMD command!
    new string[128], act[100]; // Define the 2 variables ( string and act )
    if(sscanf(params, "s[100]", act)) // Here you check if player has written /me something PROPERLY
        SendClientMessage(playerid, -1, "USAGE: /me [action]"); // if he/she wrote it wrong it will send message how to use it PROPERLY
        return 1; // exit loop
    else  // if he entered it PROPERLY then,
        format(string, sizeof(string), "* %s %s", GetName(playerid), act); // format(); prepares the message to be sent
        SendClientMessageToAll(-1, string); // This send message to all the players
    return 1; //exit loop
[1]: -1 can be changed to your favorite color
[2]:  You can change the "* %s %s" to anything, but remember since there is GetName and act there has to be 2 specifiers ( %s %s )

SendClientMessage(playerid, -1, "USAGE: /me [action]");

What is the "-1"? Isn't it supposed to be a color not a number?

-1 means WHITE by default
well, yes. It has to be a color code
but if you want to use White, you can use -1 instead of the color code

Forum Jump:

Users browsing this thread: 1 Guest(s)