SA-MP Forums Archive
Problem with registration system - 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: Problem with registration system (/showthread.php?tid=544764)



Problem with registration system - Tass007 - 03.11.2014

Hi. I've been having troubles with my registration system.

I only have the login dialog somewhat working because sometimes it pops up when you enter the server and sometimes it doesn't.
However I'm not sure how to make the registration dialog pop up if people aren't registered.

Here is my login dialog at the moment.

pawn Код:
new tmp[50],tmp2[256];
        GetPlayerIp(playerid,tmp,128);
        tmp2 = dini_Get(file,"ip");
        if(!strcmp(tmp,tmp2,true)) {
            GameTextForPlayer(playerid,"~r~Before you can play, you must login!",4000,3);
            ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_INPUT,"~~~~~~Login Password~~~~~~", " ", "OK", "Quit");
            format(string,sizeof(string),"Welcome back, %s. Please login or you will be disconnected in 60 seconds!",PlayerName);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            SendClientMessage(playerid, COLOR_BRIGHTRED, "-----------------------------------------------------------------------------------------------------------------------");
            PlayerInfo[playerid][LoggedIn] = 0;
            SetTimerEx("KickTimer",60000,0,"i",playerid);}}
Please help me. I will of course + Rep.


Re: Problem with registration system - Detoria - 04.11.2014

The problem is,that you can't show a login dialog to already registered players,and can't show the register box for non-registered players ?

If it is,create a boolean,set it to true when someone new register,save it into the account,and load it comparing with the already registered users names.


Re: Problem with registration system - Tass007 - 04.11.2014

No. Sometimes the login dialog will show up. Sometimes it won't; it's really random. But I don't know if there is a register dialog for the non-registered members.


Re: Problem with registration system - Detoria - 04.11.2014

Try make the register dialog,maybe it helps.


Re: Problem with registration system - Runn3R - 04.11.2014

Look into the tutorials on the forum for the registration system. I suggest you y_ini one.