Why doesn't this work?
#4

Quote:
Originally Posted by VonKnox
Посмотреть сообщение
Thanks, appreciate it.
Finally i've thing about it a little, and the only way to work exactly (Remove 10points of HP every 25 seconds, if the player have life <= 45 is this one:

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

forward InjuredCheck(playerid);

public OnFilterScriptInit()
{
    SetTimer("InjuredCheck",25000,1); //Check every 25 second if the player is injured and make him bleed..
    return 1;
}

public InjuredCheck(playerid)
{
    new Float:health;
    GetPlayerHealth(playerid,health);
   
    if(health < 46)
    {
    GivePlayerHealth(playerid,-10);
    }
    return 1;
}

//GivePlayerHealth Fuction (thanks to aircombat)
stock GivePlayerHealth(playerid,Float:Health)
{
new Float:health; GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health+Health);
}
So try this for the final result.
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)