13.05.2012, 21:15
Here is the admin /setmoney command
Код:
if(strcmp(cmd, "/setmoney", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /setmoney [ID na Igrac/Del od Imeto] [novac]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { SafeResetPlayerMoney(playa); SafeGivePlayerMoney(playa, money); GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, 256, "|DL|%s mu gi podesi parite na %s na $%d.", sendername,giveplayer,money); SendAdminMessage(WHITE,string); SaveAccounts(); OnPropUpdate(); } } } else { SendClientMessage(playerid, COLOR_GRAD1, "Ne ste ovlasteni za taa Komanda!"); } } return 1; }