Drugs
#8

Does this work?


pawn Код:
new checkhealth;
forward WhenUsingDrugs(playerid);
public WhenUsingDrugs(playerid) // every second
{
    new Float:Health; // A new float that will store their health.
        GetPlayerHealth(playerid, Health);
        if(Health < 100.00)
        {
            if(Health >= 98.000) SetPlayerHealth(playerid, 100.00);
            else SetPlayerHealth(playerid, Health+5.00);

        SendClientMessage(playerid, RED, "Your drugs have worn off!");
        SendClientMessage(playerid, RED, "You are no longer on drugs.");
        KillTimer(checkhealth);
        }
        return 1;
    }
Reply


Messages In This Thread
Drugs - by Beginnercoder - 14.04.2012, 19:41
Re: Drugs - by Shetch - 14.04.2012, 20:19
Re: Drugs - by Beginnercoder - 14.04.2012, 21:05
Re: Drugs - by FalconX - 14.04.2012, 22:26
Re: Drugs - by Beginnercoder - 14.04.2012, 23:06
Re: Drugs - by FalconX - 14.04.2012, 23:14
Re: Drugs - by Beginnercoder - 15.04.2012, 09:37
Re: Drugs - by captainjohn - 15.04.2012, 16:57

Forum Jump:


Users browsing this thread: 1 Guest(s)