SA-MP Forums Archive
Respawning player on death - 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: Respawning player on death (/showthread.php?tid=642046)



Respawning player on death - Riwerry - 24.09.2017

Hello, I'm facing issue in my custom damage system that when I respawn dead player from plane crash explosion, player position on spawn is not set to hospital coords (hes still in air near plane, but onplayerspawn is getting called correctly, just position doesnt seem to be updating).

I use SetSpawnInfo and SpawnPlayer inside OnPlayerDeath to skip Class Selection and proceed to OnPlayerSpawn.


Re: Respawning player on death - Sew_Sumi - 24.09.2017

Class selection isn't shown on a normal death so there is no need to skip it on player death.

If you haven't done the right checks for the callback you use to 'skip' the selection, then it's likely that this is where the problem lies.


Re: Respawning player on death - Riwerry - 24.09.2017

I was thinking that firstly too, but for me it really does getting called. I can even see the gui, arrows and spawn button.


Re: Respawning player on death - Sew_Sumi - 24.09.2017

That should only be brought up when using F4, I'd check the OnPlayerDeath callback for anything that points to the class selection.