26.09.2012, 21:32
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?
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;
}

