bug onplayerdeath - 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)
+--- Thread: bug onplayerdeath (
/showthread.php?tid=647404)
bug onplayerdeath -
RedGun2015 - 04.01.2018
I get this bug weird sometimes. When a player kill another player, he dies but the onplayerdeath is executed with killerid = 65535 (killed by no one, suicide probably) but he is killed by another player.
Код:
[21:49:39] [debug] OnPlayerDeath(1, 0, 24)
[21:49:39] DEATH: NEGATiWE[ST] was killed by YASHIN with gun 24
[21:49:47] [debug] OnPlayerDeath(1, 65535, 255)
[21:49:58] [debug] OnPlayerDeath(1, 0, 24)
[21:49:58] DEATH: NEGATiWE[ST] was killed by YASHIN with gun 24
[21:50:07] [debug] OnPlayerDeath(1, 0, 24)
[21:50:07] DEATH: NEGATiWE[ST] was killed by YASHIN with gun 24
[21:50:15] [debug] OnPlayerDeath(1, 0, 24)
[21:50:15] DEATH: NEGATiWE[ST] was killed by YASHIN with gun 24
The player (Yashin) killed me but in onplayerdeath show killerid = 65535.
Its happend sometimes, not always. But it's really annoying..
If someone can help me...please post here.
Re: bug onplayerdeath -
RogueDrifter - 04.01.2018
do you check for
PHP код:
if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
?
Re: bug onplayerdeath -
RedGun2015 - 04.01.2018
Quote:
Originally Posted by RogueDrifter
do you check for
PHP код:
if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
?
|
Yes.
Re: bug onplayerdeath -
RedGun2015 - 04.01.2018
....
Re: bug onplayerdeath -
Beckett - 04.01.2018
Well, no one knows the code you wrote more than you do. You probably have contradicted with the include somewhere in your script, I don't think there is a way for us to know what exactly is wrong in here. If you want my opinion, you should just stop using the said include and design your own that goes along with your gamemode.