How to spawn the player automatically after log in
#1

I use a textdraw to log in, he clicks on login/register then he will enter his details, after that he is supposed to spawn to his last location, but this happens:

http://imgur.com/a/Uh3cl (the image with the guy in the air)

If the player will press SPAWN it will spawn him at his last location, I want this to happen automatically without him pressing SPAWN.. It worked before, not sure whats wrong now..

I use this after the player logs in
PHP код:
for(new 026i++)
                {
                    
PlayerTextDrawDestroy(playeridloginscreen[i][playerid]);
                }
                
SetCameraBehindPlayer(playerid);
                
SpawnPlayer(playerid);
                
TogglePlayerSpectating(playerid0);
                
CancelSelectTextDraw(playerid); 
Reply
#2

Trying toggling players spectating first, then spawn them
Reply
#3

I added a timer that is called at 200 ms after the player logs in, not sure if it is the best choice but the player is spawned atleast
Reply
#4

You don't need to use SpawnPlayer if you are using TogglePlayerSpectating. Removing player from spectating mode spawns them.
Reply
#5

did u try to add SpawnPlayer(playerid); after he finish from the textdraws?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)