15.10.2010, 13:35
Код:
#include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { 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); } } } } #endif