SA-MP Forums Archive
how to bypass class section when a player dies? - 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: how to bypass class section when a player dies? (/showthread.php?tid=527252)



how to bypass class section when a player dies? - rangerxxll - 21.07.2014

sorry for any typos, this was sent from my phone.

so im trying to pretty much force the player to spawn when they die, therefore bypassing the class selection. but the thing is, spawnplayer seems to call onplayerdeath - having it be called twice. im attempting to create a death system when a player dies. but in order for me to do that, i need to have the script skip class selection and spawn them at their death location.

does anyone have any idea how to spawn them at their death location when they die?


Re: how to bypass class section when a player dies? - k0rpez - 21.07.2014

https://sampwiki.blast.hk/wiki/ForceClassSelection - that is the function if you want to force them to choose skin again. Regarding the saving of their previous location, all you have to do is insert their coordinates from OnPlayerDeath into verbs and use them upon OnPlayerSpawn. Let me know if you don't know how to do it.


Re: how to bypass class section when a player dies? - rangerxxll - 21.07.2014

im trying to figure out how to use spawnplayer without it calling onplayerdeath. because currently whatever is under onplayerdeath is being called twice.


Re: how to bypass class section when a player dies? - rangerxxll - 21.07.2014

what do you mean? can you show me an example?