When a player die [BUG]
#1

Hello, i have this bug i don't know how can i fix.
When a player die he doesn't die, just for players in nearby. But he still can shoot some other players and kill them.
I tried to create a timer (1 sec) and put to OnPlayerDeath and after 1 sec this:
Код:
ApplyAnimation(playerid, "PED", "KO_shot_front",4.1,0,1,1,1,1);
I tried something else, to create a variabile (ex: Alive) - OnPlayerSpawn > Alive[playerid] = 1, when he is dead (die), Alive[playerid] = 0, i tried to use this for my problem, no it doesn't work.. i don't know how can i fix. I see a loot of servers without this bug, and i don't know how they fix..

Can you help me?

Sorry for my bad english...
Reply
#2

So, what you're tying to do is force the player into an animation, avoiding OnPlayerDeath to be called?
Reply
#3

Quote:
Originally Posted by RedGun2015
Посмотреть сообщение
Hello, i have this bug i don't know how can i fix.
When a player die he doesn't die, just for players in nearby. But he still can shoot some other players and kill them.
I tried to create a timer (1 sec) and put to OnPlayerDeath and after 1 sec this:
Код:
ApplyAnimation(playerid, "PED", "KO_shot_front",4.1,0,1,1,1,1);
I tried something else, to create a variabile (ex: Alive) - OnPlayerSpawn > Alive[playerid] = 1, when he is dead (die), Alive[playerid] = 0, i tried to use this for my problem, no it doesn't work.. i don't know how can i fix. I see a loot of servers without this bug, and i don't know how they fix..

Can you help me?

Sorry for my bad english...
hey! you should save his positions on death. then setted it back on spawn (and playing anim). and creating a timer to clear it
Reply
#4

same...
Reply
#5

I'm not understand what you're needing. You're trying to return the player to his death position after he died? Or are you trying to prevent him from dying and to put him in an animation?
Reply
#6

This is a demonstration: https://*********/0rODzdQN6Bk - 1080p60

When i die, no one can't see me, only me i can see other players near. I can still shoot players and kill them, for other players i'm invisible.. i don't know how to fix.

onplayerdeath log
Код:
[16:09:35] [debug] OnPlayerDeath(0, 65535, 255)
[16:09:35] [death] RedGun died 255
Reply
#7

And does this apply only for you, or other players that die?
Reply
#8

for everyone...
Reply
#9

Show OnPlayerDeath code?
Reply
#10

Here is my OnPlayerDeath

https://pastebin.com/xDRtDfY3
Reply
#11

Maybe it can be get caused by TogglePlayerControllable, if you\'ve used it some where and its 1 then remove it
Reply
#12

Quote:
Originally Posted by FuNkYTheGreat
View Post
Maybe it can be get caused by TogglePlayerControllable, if you\'ve used it some where and its 1 then remove it
Nop, i didn\'t use this function wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)