14.09.2012, 18:21
Код:
YCMD:setmoney(playerid, params[], help) { #pragma unused help new id, cash, string[128], string2[128]; if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 3) { if(sscanf(params,"ui", id, cash)) return SendClientMessage(playerid, WHITE,"Use: /setmoney [ID] [Ammount]"); else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, WHITE, "Wrong id"); else ResetPlayerMoney(id); GivePlayerMoney(id, cash); format(string, sizeof(string),"You have set player %s money on $%d!", GetName(id), cash); SendClientMessage(playerid,0x00C252FF,string); format(string2, sizeof(string2),"Admin %s has set you money on $%d!", GetName(playerid), cash); SendClientMessage(id, 0x008BD9FF,string2); } else SendClientMessage(playerid, RED, "You are not an admin."); return 1; }