18.05.2012, 20:39
pawn Код:
#define MAX_DANO (20)
new Float:Health[MAX_PLAYERS], Tiros[MAX_PLAYERS];
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){
if(IsPlayerAttachedObjectSlotUsed(playerid, 3)){
GetPlayerHealth(playerid, Health[playerid]);
if(Tiros[playerid] < MAX_DANO) ++Tiros[playerid], SetPlayerHealth(playerid, Health[playerid]);
else if(Tiros[playerid] > MAX_DANO) Tiros[playerid] = 0, RemovePlayerAttachedObject(playerid, 3);
}
return true;
}