Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Tonys on January 15, 2010, 09:23:26 am

Title: Question
Post by: Tonys on January 15, 2010, 09:23:26 am
Ok so uh how do you create commands in pawn using /c !commandhere and not just !commandhere.
Title: Re: Question
Post by: Boss on January 15, 2010, 12:10:28 pm
Ok so uh how do you create commands in pawn using /c !commandhere and not just !commandhere.
Pretty much like a usual command:
Code: [Select]
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?