Wierd login bug. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Wierd login bug. (
/showthread.php?tid=402220)
Wierd login bug. -
HenrySunseri - 25.12.2012
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..
Re: Wierd login bug. -
park4bmx - 25.12.2012
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
Re: Wierd login bug. -
HenrySunseri - 25.12.2012
Thanks for the help but, nothing. I removed SpawnPlayer and it still happens :/.
Re: Wierd login bug. -
park4bmx - 25.12.2012
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;
}
Re: Wierd login bug. -
HenrySunseri - 25.12.2012
Wow, thank you very much, its fixed.