@@Cedry2k
Faci o verificare la comanda [/givemoney] in felul urmator
if(money < 0 || money > 1000000000) return SendClientMessage(playerid, COLOR_GREY, "Suma invalida. ( 1$ - 1,000,000,000$ )");
Iar comanda ta trebuie sa arate asa:
CMD:givemoney(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
new money,id,string[180],sendername[25],giveplayer[25];
if(sscanf(params, "ui",id,money)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: {FFFFFF}/givemoney <playerid/name> <Suma>");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
if(money < 0 || money > 1000000000) return SendClientMessage(playerid, COLOR_GREY, "Suma invalida. ( 1$ - 1,000,000,000$ )"); // verificarea de mai sus
GivePlayerCash(id, money);
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmCmd: %s i-a trimis %s lui %s.", sendername,FormatNumber(money),giveplayer);
if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,5);
format(string, sizeof(string), "I-ai trimis lui {7BAABA}%s(%d){FFFFFF} $%s.", GetName(id), id, FormatNumber(money));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Admin {7BAABA}%s{FFFFFF} ti-a trimis $%s.", GetName(playerid), FormatNumber(money));
SendClientMessage(id, COLOR_WHITE, string);
Update(id, pCashx);
format(string, sizeof(string), "%s a primit $%s de la %s (/givemoney)", GetName(id), FormatNumber(money), GetName(playerid));
InsertLog(id, string, LOG_MONEY);
return 1;
}