Wierd login bug.
#1

Okay, I really need some help here. I just downloaded a basic roleplay script to start my own from, and of course I run into a problem I can't figure out. So, once you have an account registered on the database you are logged in completely fine, But after you log out and back in you are prompted with the "<-- --> SPAWN" toolbar at the bottom. And once you click on "Spawn" it leads you to a buggy white screen where you can't see anything. After hours of trying to fix I still came up with nothing.
OnPlayerConnect:
Quote:

public OnPlayerConnect(playerid)
{
gOoc[playerid] = 0;

if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Basic Roleplay","Type your password below to login:","Login","Quit");
SetPlayerPos(playerid,280,2393.8257,-2167.4365);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Basic Roleplay","Type your password below to register a new account:","Register","Quit");
}
return 1;
}

And screenshot of what happens: http://gyazo.com/f1d0f923c3dfa27a2c53773042fd982b
If anyone could point out what i'm doing wrong, that'd be great..
Reply
#2

you cannot spawn the player when connecting!
you can spawn them under OnPlayerRequestClass but as soon as the player dies he will be returned to the class selection
Reply
#3

Thanks for the help but, nothing. I removed SpawnPlayer and it still happens :/.
Reply
#4

ok look don't set their pos or force spawn them when connection !
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
SpawnPlayer(playerid);
//you may tries setting the pos.
return 1;
}
Reply
#5

Wow, thank you very much, its fixed.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)