Problem with registration system
#1

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.
Reply
#2

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.
Reply
#3

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.
Reply
#4

Try make the register dialog,maybe it helps.
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)