Ok so uh how do you create commands in pawn using /c !commandhere and not just !commandhere.
Quote from: Tonys on January 15, 2010, 07: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?