SA-MP Forums Archive
Login/Register - 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: Login/Register (/showthread.php?tid=529151)



Login/Register - r0bi - 31.07.2014

Hi.I have a big problem with my system login/register and this it works on INI.
Originally login dialogs were made in public OnPlayerConnect and i moved this dialog in public OnPlayerRequestClass.Now, the problem is that the dialogs, not working correctly.When i login in server and i have a new name and name is not register, i not receive the dialog register but i receive the dialog login and this thing is not correctly.Before moved the dialogs, everything was perfect.This is the script i moved
PHP код:
 if(!fexist(UserPath(playerid)))
        {
            
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_LIGHTBLUE"Inregistrare...",""COL_GREEN"Salut!nScrie o parola pentru a te inregistra.","Register","Quit");
        }
        else if(
fexist(UserPath(playerid)))
        {
            
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
            
//GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
            //SetPlayerScore(playerid,  PlayerInfo[playerid][Level]);
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_LIGHTBLUE"Login",""COL_GREEN"Bun Venit!\n\nScrie parola pentru a te loga!","Login","Quit");
        } 
Mention that I put the same script in public OnPlayerSpawn san public OnPlayerRequestSpawn!
Sorry for my english but i have really need to help, please!


Re: Login/Register - Sanguy - 31.07.2014

Is there a feature to your script that lets unregistered players save their data if they decide they want to register later? Because maybe by the time an unregistered player requests a class, the temporary data has been written already, fooling the script into thinking the new player has already registered. This is the best guess I can come up with, sorry.