02.01.2015, 11:39
Try putting the code at the begin of OnPlayerDeath
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if( hasHit[playerid] == true && gTeam[ killerid ] == TEAM_CIV_BOUNTY )
{
new
str[128];
format(str, sizeof(str), "[HIT] %s[%d] has been killed by Bounty Hunter %s[%d] for $%d", GetName(playerid), playerid, GetName(killerid), killerid, hitAmount[playerid]);
SendClientMessageToAll(SERVER_MESSAGE, str);
GivePlayerMoney(killerid, hitAmount[playerid]);
hasHit[playerid] = false;
hitAmount[playerid] = 0;
SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
}
// The rest of your OnPlayerDeath code
return 1;
}