Command
#2

pawn Код:
new target, option[24], amount;
if(sscanf(params, "rs[24]i", target, option, amount))
If there's going to be say an amount that's a string you can do...

pawn Код:
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
}
Reply


Messages In This Thread
Command - by iGetty - 16.05.2012, 11:44
Re: Command - by [ABK]Antonio - 16.05.2012, 11:51

Forum Jump:


Users browsing this thread: 1 Guest(s)