01.02.2016, 22:51
para que le pones
pawn Код:
ResetPlayerMoney(player1);
pawn Код:
dcmd_setcash(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3) {
new tmp[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USE: /setcash [jugador] [cantidad]");
if(strval(tmp2) < 0 || strval(tmp2) > 1000000 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid, red, "ERROR: Candidad de dinero invalido");
new player1 = strval(tmp), cash = strval(tmp2), string[128];
if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
EnviarMensajesADM(playerid,"SETCASH");
format(string, sizeof(string), "* Has puesto el dinero de \"%s\" en '$%d", pName(player1), cash); SendClientMessage(playerid,blue,string);
if(player1 != playerid) { format(string,sizeof(string),"* Admin %s ha puesto tu dinero en '$%d'", pName(playerid), cash); SendClientMessage(player1,blue,string); }
return GivePlayerMoney(player1, cash);
} else return SendClientMessage(playerid,red,"ERROR: El jugador no esta conectado");
} else return SendClientMessage(playerid,red,"* Comando Solo para Administradores Nivel 3.");