16.05.2012, 11:44
How could I make this: Server: /set [playerid/name] [section] [amount]
In zcmd with sscanf?
Thanks!
In zcmd with sscanf?
Thanks!
new target, option[24], amount;
if(sscanf(params, "rs[24]i", target, option, amount))
new target, option[24], amount[24];
if(sscanf(params, "rs[24]s[24]", target, option, amount)) //whatever here
if(!strcmp(option, "MyOption", true))
{
new amountt = strval(amount); //if it's a number you want
}
//if not
if(!strcmp(option, "MyOtherOption", true))
{
if(!strcmp(amount, "Thing I want to check the amount with", true)) //we do stuff
}