03.05.2014, 09:57
Using sscanf, I have an easy way to proceed.
@MattTucker : Let him do as he want, I'm pretty sure he knows about zCMD but he could simply chose to not use.
PHP код:
// At the bottom of your OnPlayerCommandText
new cmd[26], params[128];
sscanf(cmdtext, "s[26] s[128]", cmd, params); // You can also delete the '/' to use if(!strcmp(cmd, "commandname", true)) , do as you want
if(!strcmp("car", cmd, true))
{
if(!strlen(params)) return SCM(playerid, -1, "your command list");
if(!strcmp(params, "hood", true))
{
// Hood commands
}
return 1;
}