SA-MP Forums Archive
[FilterScript] Stuck in Death Bug Fix - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Stuck in Death Bug Fix (/showthread.php?tid=312862)



Stuck in Death Bug Fix - Scott - 23.01.2012

This filterscript fixes an issue in 0.3d where clients become stuck in death when they die with an animation applied to them.

Code:
#include <a_samp>

new pLastAnimIndex[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    new animlib[32], animname[32];
    GetAnimationName(pLastAnimIndex[playerid],animlib,32,animname,32);
    if(strcmp(animlib, "PED", true) != 0) ClearAnimations(playerid);
    return 1;
}

public OnPlayerUpdate(playerid)
{
    pLastAnimIndex[playerid] = GetPlayerAnimationIndex(playerid);
    return 1;
}



Respuesta: Stuck in Death Bug Fix - [Nikk] - 23.01.2012

I never hear that before. anyway, good job. Simple, but effective. Thanks.


Re: Stuck in Death Bug Fix - geerdinho8 - 23.01.2012

This fixes the bug that you stay in death and only can die if you get slapped ?

Because if it is, it is GREAT!


Re: Stuck in Death Bug Fix - Geryy - 23.01.2012

How test this bug?


Re: Stuck in Death Bug Fix - Kar - 23.01.2012

why not just do
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    ClearAnimations(playerid);
    return 1;
}
works for me.


Re: Stuck in Death Bug Fix - Lorenc_ - 23.01.2012

Quote:
Originally Posted by Kar
View Post
why not just do
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    ClearAnimations(playerid);
    return 1;
}
works for me.
Good pick!


Re: Stuck in Death Bug Fix - T0pAz - 23.01.2012

How to replicate this bug?


Re: Stuck in Death Bug Fix - Niko_boy - 23.01.2012

never knew about such bug O_O
btw in 0.3c atleast i , or many other players have faced bug when player can walk even after death i guess that was fixed , and its differnt from that!

Quote:
Originally Posted by Lorenc_
View Post
Quote:

Quote:
Originally Posted by Kar View Post
why not just do
pawn Code:

public OnPlayerDeath(playerid, killerid, reason)
{
ClearAnimations(playerid);
return 1;
}


works for me.

Good pick!

ah yeah


Re: Stuck in Death Bug Fix - Scott - 23.01.2012

Quote:
Originally Posted by Kar
View Post
why not just do
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    ClearAnimations(playerid);
    return 1;
}
works for me.
Yes that will work, but it'll look funky (noticeably) when you have a normal death. What I posted will not clear animations if you were previously in a ped run anim.


Re: Stuck in Death Bug Fix - Kar - 23.01.2012

Quote:
Originally Posted by Scott
View Post
funky (noticeably)
Not really, death is actually still the same(nothing really changed on my server). Butif you say so.. ok.

Good Job anyway