SA-MP Forums Archive
When a player die [BUG] - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When a player die [BUG] (/showthread.php?tid=638898)



When a player die [BUG] - RedGun2015 - 07.08.2017

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


Re: When a player die [BUG] - Swarn - 07.08.2017

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


Re: When a player die [BUG] - Xeon™ - 07.08.2017

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


Re: When a player die [BUG] - RedGun2015 - 09.08.2017

same...


Re: When a player die [BUG] - Swarn - 09.08.2017

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?


Re: When a player die [BUG] - RedGun2015 - 09.08.2017

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



Re: When a player die [BUG] - Swarn - 09.08.2017

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


Re: When a player die [BUG] - RedGun2015 - 09.08.2017

for everyone...


Re: When a player die [BUG] - Swarn - 09.08.2017

Show OnPlayerDeath code?


Re: When a player die [BUG] - RedGun2015 - 09.08.2017

Here is my OnPlayerDeath

https://pastebin.com/xDRtDfY3


Re: When a player die [BUG] - FuNkYTheGreat - 09.08.2017

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


Re: When a player die [BUG] - RedGun2015 - 09.08.2017

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.