SSCANF2
#1

I did not understand the if(sscanf part with "ud"
what's ud meaning?
And If i want to add reason after the amount how to i add a scan if the player add's a reason?

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new params[128];
    GetCommandParams(cmdtext, params, sizeof(params));
    if (strcmp(cmdtext, "/pay", true) == 0)
    {
        new giveplayerid, amount;
        if (sscanf(params, "ud", giveplayerid, amount))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /pay [player] [amount]");
            return 1;
        }
        GivePlayerMoney(giveplayerid, amount);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
SSCANF2 - by PaulDinam - 26.09.2012, 21:32
Re : SSCANF2 - by ricardo178 - 26.09.2012, 21:35
Re: SSCANF2 - by West X - 26.09.2012, 21:45
Re: SSCANF2 - by PaulDinam - 26.09.2012, 21:48
Re: SSCANF2 - by West X - 26.09.2012, 21:56
Re: SSCANF2 - by PaulDinam - 26.09.2012, 21:58
Re: SSCANF2 - by PaulDinam - 26.09.2012, 22:01
Re: SSCANF2 - by copman87 - 23.11.2012, 01:18

Forum Jump:


Users browsing this thread: 2 Guest(s)