Nearest Hospital Spawn Upon Death
#5

Quote:
Originally Posted by marley
Посмотреть сообщение
for some bizarre reason for a split second it tps me to the train station where the player starts before spawning properly at the wrong hosp
That is because you are setting player position to hospital on OnPlayerSpawn. So player has spawned already to its initial spawn point before you set it to Hospital, you can try using SetSpawnInfo in OnPlayerdeath.

Quote:
Originally Posted by marley
Посмотреть сообщение
So we've made progress, so now when I die it tps me to a hospital, but it isn't the nearest,
The loop working FINE. The reason why this is happening is that you are getting distance when player spawns so it is tp'ing you to the nearest hospital to initial spawn point. For it to work you need player position when he dies store in global variable then use those position to get distance.
Reply


Messages In This Thread
Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 00:18
Re: Nearest Hospital Spawn Upon Death - by DTV - 17.07.2016, 01:11
Re: Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 02:29
Re: Nearest Hospital Spawn Upon Death - by DTV - 17.07.2016, 03:08
Re: Nearest Hospital Spawn Upon Death - by [cS]Owain - 17.07.2016, 05:17
Re: Nearest Hospital Spawn Upon Death - by oMa37 - 17.07.2016, 05:34
Re: Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 17:43

Forum Jump:


Users browsing this thread: 6 Guest(s)