SetPlayerPos or SetSpawnInfo - 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: SetPlayerPos or SetSpawnInfo (
/showthread.php?tid=663434)
SetPlayerPos or SetSpawnInfo -
Volumen - 01.02.2019
Which is more recommendable, use 'SetPlayerPos' in 'OnPlayerSpawn' or 'SetSpawnInfo' in 'OnPlayerDeath'?
Re: SetPlayerPos or SetSpawnInfo -
Pottus - 01.02.2019
SetSpawnInfo() of course you should KNOW how the player is going to spawn next time they spawn so why not set it? You can always set it as many times as you want before they spawn if there is other events that change the outcome. To me it makes more sense to use the correct function for the correct task yes SetPlayerPos() will work but that is not what it is designed for.
Re: SetPlayerPos or SetSpawnInfo -
Volumen - 01.02.2019
I have always used 'SetPlayerPos' in 'OnPlayerSpawn' and in 'OnPlayerDeath' I only adjust the player's score (it is a multimode freeroam server).
Should I use 'SetSpawnInfo' in 'OnPlayerDeath' and remove 'SetPlayerPos' from 'OnPlayerSpawn'?
Re: SetPlayerPos or SetSpawnInfo -
Pottus - 01.02.2019
Quote:
Originally Posted by Volumen
I have always used 'SetPlayerPos' in 'OnPlayerSpawn' and in 'OnPlayerDeath' I only adjust the player's score (it is a multimode freeroam server).
Should I use 'SetSpawnInfo' in 'OnPlayerDeath' and remove 'SetPlayerPos' from 'OnPlayerSpawn'?
|
That is how it is designed to work it looks smoother too the player will spawn where they SHOULD spawn.
Re: SetPlayerPos or SetSpawnInfo -
Volumen - 01.02.2019
'SetSpawnInfo' then?
Re: SetPlayerPos or SetSpawnInfo -
TheToretto - 01.02.2019
Quote:
Originally Posted by Volumen
'SetSpawnInfo' then?
|
Yes.. @Pottus explained why in his precedent posts.