OnPlayerDeath problem.. - 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: OnPlayerDeath problem.. (
/showthread.php?tid=190333)
OnPlayerDeath problem.. -
The_Moddler - 14.11.2010
When someones uses /kill or I simply set his HP to 0 sometimes he get's double-killed, what I mean? OnPlayerDeath get's called twice, also the person saws the death anim(going to the ground splashed) twice, is this a SA-MP bug?
I checked my script.. nothing bad.. huh.
Re: OnPlayerDeath problem.. -
marinov - 14.11.2010
It never happened on my server, and I also use the /kill command.
Re: OnPlayerDeath problem.. -
Cameltoe - 14.11.2010
Quote:
Originally Posted by marinov
It never happened on my server, and I also use the /kill command.
|
Sure.
Try loading an blank gm and implement the /kill command, see if this still occurs.
Re: OnPlayerDeath problem.. -
marinov - 14.11.2010
don't feel like it lol
Re: OnPlayerDeath problem.. -
The_Moddler - 14.11.2010
Actually, doing some debugging, I found that OnPlayerDeaths get's only called one time, but the death animation sometimes happends twice.
Re: OnPlayerDeath problem.. -
Buzzbomb - 14.11.2010
Done the same to me so im gonna add a timer to hit a forward function
Re: OnPlayerDeath problem.. -
The_Moddler - 15.11.2010
Quote:
Originally Posted by Buzzbomb
Done the same to me so im gonna add a timer to hit a forward function
|
Egrr.. what?
Anyway, is there a fix for this?
Re: OnPlayerDeath problem.. -
Cameltoe - 15.11.2010
Quote:
Originally Posted by The_Moddler
Egrr.. what?
Anyway, is there a fix for this?
|
No idea, this never occurred for me.. But you could apply the death animation before the callback does.
Re: OnPlayerDeath problem.. -
ColdXX - 15.11.2010
I had this too,idk how to fix tho.
Re: OnPlayerDeath problem.. -
Buzzbomb - 16.11.2010
Quote:
Originally Posted by The_Moddler
Egrr.. what?
Anyway, is there a fix for this?
|
Oh my lord i should said that better with understanding heheh
pawn Код:
Forward Ijustdieddamn(playerid);
public OnPlayerDeath(playerid)
{
SetTimer("Ijustdieddamn", 3500, 0);
return 1;
}
public Ijustdieddamn(playerid)
{
GameTextForPlayer(playerid,"You Have Almost Died But A Local Has Found you", 3000, 1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1683.3362,-2326.4019,13.5469);
SetPlayerFacingAngle(playerid, 357.8167);
return 1;
}
Now this worked for me Got tired of it Now enjoy!
Quote:
Oh nevermind omg i need to get offline for awhile i'm losing it Ignore this post Sorry Moddler Hehe my problem was different...
|