11.02.2014, 22:49
pawn Код:
if(strcmp(cmdtext, "/armor", true) == 0) {
if (GetPlayerMoney(playerid) < 10)
return SendClientMessage(playerid, 0xFF0000AA, "[ERRO]: Vocк nгo possui dinheiro suficiente 10$");
if (GetPVarInt(playerid, "noX1") == 1 )
return SendClientMessage(playerid, -1, "{FF140F}[ERRO]: {FFFFFF}Voзe Este em uma arena dm para sair use: /sairdm");
if (GetPVarInt(playerid, "comprou_colete") == 1 )
return SendClientMessage(playerid, -1, "Vocк sу podera comprar um novo colete apуs sua morte!");
SetPlayerArmour(playerid, 100.0);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s comprou um {FF00FF}colete {FF0000}( /armor )", pname);
SendClientMessageToAll(0xFFFFAE96, string);
GivePlayerMoney(playerid, -100);
SetPVarInt(playerid, "comprou_colete", 1);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
DeletePVar(playerid, "comprou_colete");
return 1;
}