Quote:
Originally Posted by PotH3Ad
The string size is to small as well and there is no need to create 2 different strings.
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 str[40+MAX_PLAYER_NAME]; format(str, sizeof(str), "You have sent %d to %s",amount,id); SendClientMessage(playerid, COLOR_GREEN, str); format(str, sizeof(str), "You have recieved %d from %s",amount,id); SendClientMessage(id, COLOR_GREEN, str); } return 1; }
|
That works, except it dosnt show the players name.