25.11.2011, 16:16
Ola galera criei um simples sistema de recompenзa mais ela nao reseta quando morre e nem seta o dinheiro:
pawn Код:
new granastatus[MAX_PLAYERS];
pawn Код:
new nomedofd[MAX_PLAYER_NAME];GetPlayerName(killerid, nomedofd, sizeof(nomedofd));
if(granastatus[playerid] > 0 && (GetPlayerTeam(killerid) == 0 || GetPlayerTeam(playerid) != GetPlayerTeam(killerid))) {
format(string, sizeof(string), "[RECOMPENSAS]: %s recebeu a recompensa de $%d mil euros por matar %s.", nomedofd, granastatus[playerid], PlayerName(playerid));
SendClientMessageToAll(0x33AA33AA,string);
GivePlayerMoney(killerid, granastatus[playerid]);
granastatus[killerid]++;
granastatus[playerid] = 0;
}
pawn Код:
if(GetPlayerTeam(killerid) != GetPlayerTeam(playerid))
{
granastatus[killerid] = Mortes[killerid] * 1000;
granastatus[playerid] = 0;
GivePlayerMoney(killerid, granastatus[playerid]);
Mortes[killerid]++;
PlayerInfo[playerid][pMorreu]++;
PlayerInfo[killerid][pMatou]++;
SetPlayerScore(killerid,GetPlayerScore(killerid) +1);
GivePlayerMoney(killerid, 2500);
GameTextForPlayer(killerid, "~y~Voce matou um ~w~emo!", 2500, 5);
}