Quote:
Originally Posted by RealCop228
It took me 30 seconds to do this...
pawn Код:
new KillStreak[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason) { if(killerid != INVALID_PLAYER_ID) KillStreak[killerid]++; else KillStreak[playerid] = 0; switch(KillStreak[killerid]) { case 3: // do something, they have 3 kills case 7: // do something, they have 7 kills case 10: // do something, they have 10 kills case 20: // do something, they have 20 kills } return 1; }
|
The player's kill streak will only be reset to 0 when they suicide. It should be reset for playerid every time they die, not just uf killerid is INVALID_PLAYER_ID.