21.02.2012, 01:22
because you have the script under OPU which gets called a lot, you need to store a variable like...
and then unset it when they get healed or die ect.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(!playersOnCrack[playerid])
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health < 20.0)
{
ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid, COLOR_GREY, " You are on auto-crack mode type /suicide or Wait for EMS");
playersOnCrack[playerid] = 1;
}
}
return 1;
}