How can I fix that
#1

So, I have a timer (6,5 seconds) that start when OnPlayerDeath is called and check if OnPlayerSpawn was called for player, if hasn't, i use SpawnPlayer(playerid). Everything is good, he is called, but i have a little problem.

When the player get afk in the animation when he died and he put the game in bar timer still runing behind (i think) for player, and when he come back, OnPlayerSpawn and Timer is simultaneously called and he will be spawned twice and when this happen, he doesn't spawn at his normal zone, he spawn in air or 0.0, 0.0, 0.0 (x,y,z) or grove street zone (another vw), typically samp. Or he get first spawn from the timer after 6,5 sec, and when he come back OnPlayerSpawn is called (same, spawned twice)...

I use a variabile (Alive[playerid]) to OnPlayerDeath " = 0 " and OnPlayerSpawn " = 1 " to check if the function was called.

How can I do to fix this? Or I can't?
Reply


Messages In This Thread
How can I fix that - by None1337 - 27.01.2018, 15:58
Re: How can I fix that - by Sew_Sumi - 27.01.2018, 16:07
Re: How can I fix that - by None1337 - 27.01.2018, 16:08
Re: How can I fix that - by iSteve - 27.01.2018, 16:41
Re: How can I fix that - by Sew_Sumi - 27.01.2018, 21:31
Re: How can I fix that - by RogueDrifter - 27.01.2018, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)