Health
#6

You have set the function, that's okay, but you forgot the callback which you are gonna use to call this callback:
You can use a timer , or you can use OnPlayerUpdate callback:
pawn Код:
public OnPlayerUpdate(playerid)
{
        new Float:health;
    GetPlayerHealth(playerid, health);
    if(health < 6)
    {
        TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, COLOR_WHITE, "[Medic]: Nu mai ai Viata, Contacteaza un Medic(/call 911).");
    }
    return 1;
OnPlayerUpdate is called every second, when player's stats are updated.

EDIT: nvm, late.
Reply


Messages In This Thread
Health - by StR_MaRy - 28.11.2014, 07:44
Re: Health - by HY - 28.11.2014, 08:08
Re: Health - by StR_MaRy - 28.11.2014, 08:14
Re: Health - by HY - 28.11.2014, 08:16
Re: Health - by StR_MaRy - 28.11.2014, 08:27
Re: Health - by Sawalha - 28.11.2014, 08:27

Forum Jump:


Users browsing this thread: 3 Guest(s)