07.08.2010, 14:00
here, my fault:
pawn Код:
public OnFilterScriptInit()
{
//your OnGameModeInitCode
SetTimer("HealthCheck", 1000, 1);
return 1;
}
forward HealthCheck();
public HealthCheck()
{
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
new Float:Health;
GetPlayerHealth(i, Health);
if(Health < 50){
ApplyAnimation(i,"SWAT","gnstwall_injurd" , 4.0, 1, 0, 0, 0, 0);//Anim
TogglePlayerControllable(i, 0);// Freeze the player
SetPlayerHealth(i, Health + 1);//Optional for increace player's life, and unfreeze it
}
else{
ClearAnimations(i);
TogglePlayerControllable(i, 1);
}
}
}
}