03.08.2011, 05:10
pawn Код:
CMD:givecash(playerid,params[])
{
new
id,
amount;
if (sscanf(params, "ud", id, amount)) SendClientMessage(playerid,COLOR_RED,"Usage: /givecash <ID> <Amount>");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Player Not Connected!");
else
{
GivePlayerMoney(id,amount);
new string[19];
new string1[19];
format(string, sizeof(string), "You have sent %d to %s",amount,id);
format(string1, sizeof(string1), "You have recieved %d from %s",amount,id);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(id, COLOR_GREEN, string1);
}
return 1;
}
Also read this:
Код:
%b Inserts a number at this position in binary radix %c Inserts a single character. %d Inserts an integer (whole) number %f Inserts a floating point number. %i Inserts an integer. %s Inserts a string. %x Inserts a number in hexadecimal notation. %% Inserts the literal '%'