12.09.2014, 01:59
Hi all, need help with command.
/test1 drugs - Work
/test1 mats - return SCM(playerid,-1,"USE: /test1 mats [1-2] 1"); (Work)
/test1 mats 1-2 - Doesn't work (message "mats OK" not show)
or if i write instead 1-2: 0 or 3+ this too doesn't work
Can anyone help7
/test1 drugs - Work
/test1 mats - return SCM(playerid,-1,"USE: /test1 mats [1-2] 1"); (Work)
/test1 mats 1-2 - Doesn't work (message "mats OK" not show)
or if i write instead 1-2: 0 or 3+ this too doesn't work
Can anyone help7
PHP код:
CMD:test1(playerid,params[])
{
new test[10];
if(sscanf(params,"s[10]",test)) return SCM(playerid,-1,"USE: /test1");
if(!strcmp(test,"drugs",true))
{
SCM(playerid,-1,"drugs OK");
return true;
}
else if(!strcmp(test,"mats",true))
{
new slot;
if(sscanf(params,"{s[10]}d",slot)) return SCM(playerid,-1,"USE: /test1 mats [1-2] 1");
if(slot > 2 || slot < 1) return SCM(playerid,-1,"USE: /test1 mats [1-2] 2");
SCM(playerid,-1,"mats OK");
return true;
}
return true;
}