01.10.2016, 05:28
I can't remember how to do this or what to look up to figure out how to do this, but how do you make a command that has a "parameter tree" (idk what to call it)
I hope that what I'm asking isn't too confusing, I just don't know what it would be called.
pawn Код:
//example of what i mean
CMD:example(playerid,params[])
{
new param1[128],param2;
if(sscanf(params,"s[128]i",param1)) return SendClientMessage(playerid,-1,"example text");
if(!strcmp(param1,"sometext",true))
{
if(sscanf(params,"s[128]i",param1,param2)) return SendClientMessage(playerid,-1,"example text 2"); //this is what I mean by "parameter tree"
//code here
}
}