08.04.2017, 12:30
(
Последний раз редактировалось denNorske; 08.04.2017 в 15:54.
)
Hello!
I've had quite a few issues understanding fully how to work with "SetSpawnInfo" as I've mostly been using SetPlayerPos and SetPlayerTeam before. I implemented a new way of teleporting on my server, and along in the process I decided to adapt into SetSpawnInfo.
However, I've issues understanding a few things, I would like to clear up:
I expect OnPlayerSpawn to be called...
1. when the player has died
2. When the player get spawned with SpawnPlayer(..)
3. newstate == PLAYER_STATE_SPAWNED under "OnPlayerStateChange" should be called
4. When TogglePlayerSpectating(playerid, 0); is used.
However only the fourth case prints out any of the messages in OnPlayerSpawn..
And OnPlayerRequestSpawn is only called from within Class selection?
If I Disable all occurences of SetSpawnInfo in my script - All the cases above works flawlessy.
Why is this so, and how can I "fix" this? It complicates things alot more if i can't see if the player spawns at any time.
I realise this might be a localized issue as it's not recreateable in my other gamemode.
I'll look through and see if i can find something fishy, but it's weird that everything works when i disable all SetSpawnInfo's...
I've had quite a few issues understanding fully how to work with "SetSpawnInfo" as I've mostly been using SetPlayerPos and SetPlayerTeam before. I implemented a new way of teleporting on my server, and along in the process I decided to adapt into SetSpawnInfo.
However, I've issues understanding a few things, I would like to clear up:
I expect OnPlayerSpawn to be called...
1. when the player has died
2. When the player get spawned with SpawnPlayer(..)
3. newstate == PLAYER_STATE_SPAWNED under "OnPlayerStateChange" should be called
4. When TogglePlayerSpectating(playerid, 0); is used.
However only the fourth case prints out any of the messages in OnPlayerSpawn..
And OnPlayerRequestSpawn is only called from within Class selection?
If I Disable all occurences of SetSpawnInfo in my script - All the cases above works flawlessy.
Why is this so, and how can I "fix" this? It complicates things alot more if i can't see if the player spawns at any time.
I realise this might be a localized issue as it's not recreateable in my other gamemode.
I'll look through and see if i can find something fishy, but it's weird that everything works when i disable all SetSpawnInfo's...