[FilterScript] Stuck in Death Bug Fix
#1

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;
}
Reply
#2

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

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

Because if it is, it is GREAT!
Reply
#4

How test this bug?
Reply
#5

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

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!
Reply
#7

How to replicate this bug?
Reply
#8

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)