16.05.2014, 16:42
Don't use PVars - they're slower.
Player_DamageTaken[playerid] stores the total amount a player took damage by players. In each round (if you have of course) you can reset it to 0.
pawn Код:
static
Float: Player_DamageTaken[MAX_PLAYERS];
// OnPlayerConnect:
Player_DamageTaken[playerid] = 0.0;
// OnPlayerDeath:
Player_DamageTaken[playerid] = 0.0;
// OnPlayerTakeDamage (damage taken by players):
if (issuerid != INVALID_PLAYER_ID)
{
Player_DamageTaken[playerid] += amount;
}