09.11.2015, 19:51
Quote:
CMD:givemoney(playerid, params[]) { new string[SOS]; new toplayerid, money, sendername[MAX_PLAYER_NAME], recievername[MAX_PLAYER_NAME]; if(sscanf(params,"ui", toplayerid, money)) return SendClientMessage(playerid, RED, "ERROR: /givemoney [Playerid] [Money]"); if(!IsPlayerConnected(toplayerid)) return SendClientMessage(playerid, RED, "ERROR: Player is not connected"); GetPlayerName(playerid, sendername, 24); GetPlayerName(toplayerid, recievername, 24); format(string, SOS, "You Have Sent %i $ To %s.", sendername); SendClientMessage(playerid, GREEN, string); format(string, SOS, "You Have Recieved %i $ From %s.", recievername); SendClientMessage(toplayerid, GREEN, string); GivePlayerMoney(playerid, -money); GivePlayerMoney(toplayerid, money); return 1; } |
[10:38:15] You Have Sent 91 $ To .
[10:38:15] You Have Recieved 91 $ From .
Note:it ALWAYS says 91$ whatever if you typed any other amount and it doesn't show the name