SA-MP Forums Archive
Question about spawning - 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: Question about spawning (/showthread.php?tid=621781)



Question about spawning - Sliderin - 14.11.2016

Hello, i was wondering if anyone would be able to tell me what callback occurs when a player dies and is about to respawn. What decides it's spawn location, if for example there is no added player classes (AddPlayerClass). And also, when does OnPlayerRequestClass get called? Sorry if this was asked before, i couldn't find an answer anywhere. Thanks


Re: Question about spawning - Vince - 14.11.2016

There must always at least be one class otherwise you will get glitched upon spawning ("stay within the world boundaries"). Where the player spawns is defined by the selected class, unless these values were overridden with SetSpawnInfo.


Re: Question about spawning - Sliderin - 14.11.2016

Ok, but if i set someone's spawn info when he registeres, and then he changes the spawn afterwards, will OnPlayerSpawn check to see if there is a new spawn info or will it just spawn the old one?


Re: Question about spawning - iLearner - 15.11.2016

Set cords to where ever you want to spawn him under OnPlayerSpawn


Re: Question about spawning - Sliderin - 15.11.2016

And what about OnPlayerRequestClass and OnPlayerRequestSpawn? should i put SpawnPlayer(playerid);, return them 0 or just leave them empty?

If i'm setting the spawn info on OnPlayerSpawn