16.01.2017, 13:15
When player wanna send money to player it's says unknown command idk why
Код:
CMD:givecash(playerid,params[]) { new id, amount, l_string[200], name[MAX_PLAYERS], name2[MAX_PLAYERS], ID, string8[200]; if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,red,"/givecash [id] [amount]"); if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid,RED,"You don't have enought cash"); if(amount < 0) return SendClientMessage(playerid,RED,"You have entered an invalid amount"); if(id == playerid) return SendClientMessage(playerid,RED,"You can't give money to yourself."); F_GivePlayerMoney(playerid,-amount); F_GivePlayerMoney(id,amount); GetPlayerName(playerid,name,25); format(l_string,128,"%s has given to you the amount of cash: %i$",name,amount); SendClientMessage(id,COLOR_LIME,l_string); GetPlayerName(ID, name2, sizeof(name2)); format(string8, sizeof(string8),"You have transfered %i$ to %s",amount,name2); SendClientMessage(playerid, COLOR_LIME, string8); return 1; }