22.03.2011, 10:50
I don't know how you would do It, since sscanf searches for either integer/float etc. or a string, not both integer/string.
If you can figure It out though, you should not compare "params" but the string.
I don't think this will work, but try this;
It might work to /bank all but not to /bank 1000 for example.
I'd suggest doing it with dialogs instead, much easier.
If you can figure It out though, you should not compare "params" but the string.
I don't think this will work, but try this;
It might work to /bank all but not to /bank 1000 for example.
pawn Код:
dcmd_bank(playerid, params[])
{
new amount[12];
if(!sscanf(params,"s[12]",amount))
{
if(!sscanf(amount,"all"))
{
// Bank all money
}
else
{
// Normal number
}
}
return 1;
}