Death upon SpawnPlayer
#1

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.
Reply
#2

Hello you should use SetSpawnInfo before SpawnPlayer
Reply
#3

Quote:
Originally Posted by TheToretto
View Post
Hello you should use SetSpawnInfo before SpawnPlayer
Am I to put it in the same function where SpawnPlayer is located, or?
Reply
#4

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.
Reply
#5

The thing is that I did it but it still kills the player.
Reply
#6

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?
Reply
#7

I believe so, yes.

P.S: Coordinates set in SetSpawnInfo are other than 0 0 0.
Reply
#8

Can you show me the lines SetSpawnInfo and SpawnPlayer please + where you called them?
Reply
#9

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.
Reply
#10

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.
Reply
#11

You use TogglePlayerSpectating? If yes look around the forums about its behaviours
Reply
#12

Don't spawn the player if he's in spectating mode.
Reply
#13

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.
Reply
#14

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)