onplayerdeath problem
#1

Hello guys, I use this include for detecting players that use AirBrake
https://sampforum.blast.hk/showthread.php?tid=474196

The problem is, when a player is killed by another player, OnPlayerDeath is called twice
And if a player kill with Deagle another Player, in server logs appears something like this:
Код:
[02:04:10] [debug] OnPlayerDeath(0, 1, 0)
[02:04:10] DEATH: tiwerOfficial was killed by NEGATiWE with gun 0
[02:04:10] [debug] OnPlayerDeath(0, 65535, 255)
So, he killed my with deagle (reason 24) but above is 0, because of the include.
How can i solve?
Reply
#2

bump
Reply
#3

INVALID_PLAYER_ID = killerid = 65535

Means there's no killer
Reply
#4

I know that man, but OnPlayerDeath is called twice, that is my problem. How can I fix?
Reply
#5

bump
Reply
#6

Can we see the OnPlayerDeath code?
Reply
#7

Quote:
Originally Posted by rfr
Посмотреть сообщение
Can we see the OnPlayerDeath code?
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    s_AirbreakDetectImmunity[playerid] = gettime() + 3;

	#if defined AB_OnPlayerDeath
	    return AB_OnPlayerDeath(playerid, killerid, reason);
	#else
	    return 1;
	#endif
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)