OnPlayerDeath problem..
#1

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.
Reply
#2

It never happened on my server, and I also use the /kill command.
Reply
#3

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.
Reply
#4

don't feel like it lol
Reply
#5

Actually, doing some debugging, I found that OnPlayerDeaths get's only called one time, but the death animation sometimes happends twice.
Reply
#6

Done the same to me so im gonna add a timer to hit a forward function
Reply
#7

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?
Reply
#8

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.
Reply
#9

I had this too,idk how to fix tho.
Reply
#10

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...

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)