30.09.2014, 04:40
1.) You need to save the id of the killer of player killed in a variable.
2.) You don't want to use IsPlayerConnected() instead what you want to do is check when a player logs out if they are in another players MyKiller variable.
Example.
3.) Check for a revenge kill on death
I hope that helps.
pawn Код:
Example. MyKiller[playerid] = killerid;
Example.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(MyKiller[i] == i) MyKiller[i] = INVALID_PLAYER_ID;
}
pawn Код:
if(MyKiller[killerid] == playerid)