Death upon SpawnPlayer -
Tom Kingston - 30.10.2018
Greetings,
Pardon me if this question's been asked and answered before.
I'm trying to spawn the players after finishing the registration process, but they die and spawn in Blueberry or they don't spawn at all and their skin is all mashed up in a small "chunk".
Any helpful advice will be greatly appreciated.
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
Hello you should use
SetSpawnInfo before
SpawnPlayer
Re: Death upon SpawnPlayer -
Tom Kingston - 31.10.2018
Quote:
Originally Posted by TheToretto
|
Am I to put it in the same function where SpawnPlayer is located, or?
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
No not specially you can put it anywhere, just before calling SpawnPlayer.
Example: SetSpawnInfo in a function in the last lines of your script and SpawnPlayer in the very first lines, if you call the function to SetSpawnInfo, then SpawnPlayer, it will still work.
Re: Death upon SpawnPlayer -
Tom Kingston - 31.10.2018
The thing is that I did it but it still kills the player.
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
What do you mean by kill the player? The player is spawned at the coordinates 0 0 0 (xyz) then fall underground and collapses with the invisible ground and dies right?
Re: Death upon SpawnPlayer -
Tom Kingston - 31.10.2018
I believe so, yes.
P.S: Coordinates set in SetSpawnInfo are other than 0 0 0.
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
Can you show me the lines SetSpawnInfo and SpawnPlayer please + where you called them?
Re: Death upon SpawnPlayer -
Tom Kingston - 31.10.2018
Due to a contract of confidentiality I can't really show the whole code, but I'll explain -
I first set the spawn info when the player gets the first dialog regarding their gender, then spawn them when they're waiting for an administrative personnel to respond to their character application, which happens in like, - 3 or 4 dialogs.
P.S: I'm using an include "EasyDialog" for the dialogs.
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
Just use the whole arguments of the native:
SetSpawnInfo(playerid, team, skin, Float

, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
Put 0 on useless arguments and replace the coordinates, if still doesn't work, start debugging using prints.
Re: Death upon SpawnPlayer -
v1k1nG - 31.10.2018
You use TogglePlayerSpectating? If yes look around the forums about its behaviours
Re: Death upon SpawnPlayer -
TheToretto - 31.10.2018
Don't spawn the player if he's in spectating mode.
Re: Death upon SpawnPlayer -
Tom Kingston - 31.10.2018
The spectating mode wasn't even mentioned before the spawn part.
Update: Placed the SetSpawnInfo before the SpawnPlayer in the algorithm and removed the floating skin-chunk problem.
Managed to go around the death problem by making a timer which revives the player automatically.
Thank you, TheToretto.
Re: Death upon SpawnPlayer -
v1k1nG - 31.10.2018
Mine was only a question because I've experienced similar behaviours in the past, but if you're willing to act rude without even posting a snippet to make people be able to waste their time upon helping you, good luck then.