Need help with hospital spawn
#2

Not sure exactly what your issue is... but...

OnPlayerSpawn is called when a player is set to spawn, before actually spawning. Honestly setting the player's position there isn't the best option, a more proper way to avoid very minor weird things would be getting used to using SetSpawnInfo BEFORE the player is sent to OnPlayerSpawn.

Using SetPlayerPos will indeed set the player's position, the player will be where you tell them to be.

Setting the position in OnPlayerDeath is probably not going to do much for you for what you are doing, it's called when the player is pronounced dead. Using SetPlayerPos here will not set the player's position because the player is going to respawn and be sent to their spawn position (assigned by AddPlayerClass or SetSpawnInfo).



Basically, when OnPlayerSpawn is called, internally your player is going to be sent to the position set by AddPlayerClass or SetSpawnInfo. You are setting the player's position in OnPlayerSpawn (as most people do unfortunately, including me even), which will be after they are sent to the other position. Setting the position in OnPlayerDeath isn't going to do much.
Reply


Messages In This Thread
Need help with hospital spawn - by ColweeN - 29.03.2019, 01:59
Re: Need help with hospital spawn - by Crayder - 29.03.2019, 02:24
Re: Need help with hospital spawn - by ColweeN - 29.03.2019, 02:28
Re: Need help with hospital spawn - by MSC - 29.03.2019, 02:36
Re: Need help with hospital spawn - by Crayder - 29.03.2019, 03:20
Re: Need help with hospital spawn - by ColweeN - 29.03.2019, 07:08
Re: Need help with hospital spawn - by akib - 29.03.2019, 08:12
Re: Need help with hospital spawn - by ColweeN - 29.03.2019, 08:36

Forum Jump:


Users browsing this thread: 1 Guest(s)