How to lose hp every 10 seconds? how to make that?
#3

On top of your script under the includes:
pawn Код:
forward hpupdate();
Under OnGameModeInit
pawn Код:
SetTimer("hpupdate", 10000, true);
Somewhere in your script:
pawn Код:
public hpupdate()
{
for (new i = 0; i < MAX_PLAYERS; i++)
    {
if(IsPlayerConnected(i))
    {
new Float: health;
GetPlayerHealth(i, health);
SetPlayerHealth(i, health-1);
    }
    }
}
NOTE: I didn't test this but it should work fine i think

EDIT: Damn you posted it while I was typing it :P
Reply


Messages In This Thread
How to lose hp every 10 seconds? how to make that? - by dirkblok - 21.10.2009, 12:13
Re: How to lose hp every 10 seconds? how to make that? - by pagie1111 - 21.10.2009, 12:22
Re: How to lose hp every 10 seconds? how to make that? - by Rzzr - 21.10.2009, 12:23
Re: How to lose hp every 10 seconds? how to make that? - by saiberfun - 21.10.2009, 12:50
Re: How to lose hp every 10 seconds? how to make that? - by dirkblok - 21.10.2009, 12:51

Forum Jump:


Users browsing this thread: 2 Guest(s)