Death timer. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Death timer. (
/showthread.php?tid=195946)
Death timer. -
Karl1195 - 04.12.2010
Hello guys i am re-starting scripting and i always wanted to do that when a person dies he get the /fall anim and he have 450 seconds till a medic helps.
If you got an idea how to do this i would be looking foward to learn =] .
Thanks a lot karl1195.
Re: Death timer. -
Fresh-Gta - 04.12.2010
put this in your OnPlayerUpdate
pawn Код:
new Float: Health;
if(GetPlayerHealth(playerid,Health) < 10)
ApplyAnimation(playerid,"CRACK","crckdeth1",4.1,1,1,1,1,1,1);
SetTimer( "Nohelp", 5000, false);
change 5000 in timer with the time you wan't
pawn Код:
public Nohelp()
{
SetPlayerHealth(playerid,0);
}
p.s. don't forget "forward Nohelp();"
Re: Death timer. - rjjj - 04.12.2010
The public Nohelp is giving error to me because the
playerid.
I think it will way better, here, the fixed public:
pawn Код:
public Nohelp()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SetPlayerHealth(i, 0);
}
}
i hope i have helped
Re: Death timer. -
Karl1195 - 04.12.2010
Okay thanks a lot i will try this soon thanks buddy if you don't mind can you add me on msn
khibs@hotmail.com
Thanks a lot.