• Welcome to Vice City Multiplayer.
 

Question

Started by Tonys, January 15, 2010, 06:23:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tonys

Ok so uh how do you create commands in pawn using /c !commandhere and not just !commandhere.

Boss

Quote from: Tonys on January 15, 2010, 06:23:26 AM
Ok so uh how do you create commands in pawn using /c !commandhere and not just !commandhere.
Pretty much like a usual command:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if (strcmp(cmd, "!commandhere", true) == 0)
    {
        // Do stuff.
        return 1;
    }
    return 0;
}


Why would you want to use both "/c " and "!" anyway?