Bank system
#4

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.

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;
}
I'd suggest doing it with dialogs instead, much easier.
Reply


Messages In This Thread
Bank system - by mrcoolballs - 22.03.2011, 09:58
Re: Bank system - by mrcoolballs - 22.03.2011, 10:15
Re: Bank system - by Stigg - 22.03.2011, 10:49
Re: Bank system - by Mike Garber - 22.03.2011, 10:50
Re: Bank system - by mrcoolballs - 22.03.2011, 11:43
Re: Bank system - by Zh3r0 - 22.03.2011, 12:09
Re: Bank system - by mrcoolballs - 22.03.2011, 12:31
Re: Bank system - by Zh3r0 - 22.03.2011, 12:33
Re: Bank system - by mrcoolballs - 22.03.2011, 12:49
Re: Bank system - by Zh3r0 - 22.03.2011, 13:19

Forum Jump:


Users browsing this thread: 1 Guest(s)