15.10.2010, 13:36
You might want to change a bit of that code, give me a sec ill edit this post 
Optimized, Intended. ---> Made it noobish so you would get an better understanding. the script is not tested so i don't guarantee it to work.

Optimized, Intended. ---> Made it noobish so you would get an better understanding. the script is not tested so i don't guarantee it to work.
pawn Код:
// Includes
#include <a_samp>
// Forwards
forward HealthCheck(playerid);
// Enums
enum PlayerInfo
{
Float: Health,
}
// Symbols
new pInfo[MAX_PLAYERS][PlayerInfo];
// Timers
new HealthTimer[MAX_PLAYERS];
// Callbacks
public OnFilterScriptInit()
{
printf("Health Check By Cameltoe....... <--- o_o --->");
return 1;
}
public OnPlayerConnect(playerid)
{
HealthTimer[playerid] = SetTimerEx("HealthCheck", 1000, true, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(HealthTimer[playerid]);
return 1;
}
// Functions
public HealthCheck(playerid)
{
GetPlayerHealth(playerid, pInfo[playerid][Health]);
if(floatround(pInfo[playerid][Health]) < 50)
{
ApplyAnimation(playerid,"SWAT","gnstwall_injurd" , 4.0, 1, 0, 0, 0, 0);//Anim
TogglePlayerControllable(playerid, 0);// Freeze the player
SetPlayerHealth(playerid, pInfo[playerid][Health] - 1);//Optional for increace player's life, and unfreeze it
}
else
{
ClearAnimations(playerid); // You Would Probably remove this ;)
TogglePlayerControllable(playerid, 1);
}
}