22.06.2014, 16:28
eu tenho um problema no meu servidor. Sempre que morro perco 100$ porem no OnPlayerDeath n tem nada disso
n sei se acontece com os outros mas podera ser bug do jogo?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid >= INVALID_PLAYER_ID)
{
PlayerInfo[playerid][Deaths]++;
}
else
{
if(GetPlayerTeam(killerid) == GetPlayerTeam(playerid))
{
SetPlayerHealth(killerid,0);
SendClientMessage(killerid,COLOR_AVSH,"[Dica:] {ffffff}Nгo mates a tua equipa!");
}
else
{
new finalmoney,finalscore,boostd,boosts;
if(PlayerInfo[playerid][BoostDinheiro] == 0) boostd = 0;
else if(PlayerInfo[playerid][BoostDinheiro] == 1) boostd = 130;
else if(PlayerInfo[playerid][BoostDinheiro] == 2) boostd = 150;
else if(PlayerInfo[playerid][BoostDinheiro] == 3) boostd = 250;
if(PlayerInfo[playerid][BoostScore] == 0) boosts = 0;
else if(PlayerInfo[playerid][BoostScore] == 1) boosts = 130;
else if(PlayerInfo[playerid][BoostScore] == 2) boosts = 150;
else if(PlayerInfo[playerid][BoostScore] == 3) boosts = 250;
finalmoney = (150*(boostd+EventoMoney))/100;
finalscore = (20*(boosts+EventoMoney))/100;
SendDeathMessage(killerid,playerid,reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+finalscore);
GivePlayerMoney(killerid,finalmoney);
PlayerInfo[killerid][Kills]++;
PlayerInfo[playerid][Deaths]++;
}
}
return 1;
}