Why doesn't this work?
#2

Have fun with Injured people

pawn Код:
#include <a_samp>
#define COLOR_RED 0xAA3333AA

new Injured[MAX_PLAYERS];
forward Bleeding(playerid);
forward InjuredCheck(playerid);

public OnFilterScriptInit()
{
    SetTimer("Bleeding",25000,1); // Bleeding every 25 seconds
    SetTimer("InjuredCheck",24000,1); //Check every 24 second if the player is injured..
    return 1;
}


public InjuredCheck(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid,health);
   
    if(health < 46)
    {
    Injured[playerid]=1;
    }
    else
    {
    if(health > 46)
    {
    Injured[playerid]=0;
    }
    }
    return 1;
}

public Bleeding(playerid)
{
    if (Injured[playerid] == 1)
    {
    SetPlayerHealth(playerid,-10);
    }
    return 1;
}
Reply


Messages In This Thread
Why doesn't this work? - by VonKnox - 19.09.2010, 00:08
Re: Why doesn't this work? - by nepstep - 19.09.2010, 01:12
Re: Why doesn't this work? - by VonKnox - 19.09.2010, 01:13
Re: Why doesn't this work? - by nepstep - 19.09.2010, 01:36
Re: Why doesn't this work? - by VonKnox - 19.09.2010, 01:43

Forum Jump:


Users browsing this thread: 1 Guest(s)