Spamming Message
#4

because you have the script under OPU which gets called a lot, you need to store a variable like...

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;
}
and then unset it when they get healed or die ect.
Reply


Messages In This Thread
Spamming Message - by KeeDee - 21.02.2012, 01:03
Re: Spamming Message - by chrism11 - 21.02.2012, 01:17
Re: Spamming Message - by KeeDee - 21.02.2012, 01:21
Re: Spamming Message - by cessil - 21.02.2012, 01:22
Re: Spamming Message - by KeeDee - 21.02.2012, 01:23

Forum Jump:


Users browsing this thread: 1 Guest(s)