Registration Issue
#1

I am creating a registration system using dialogs.
Under OnPlayerRequestClass:
pawn Код:
if(!udb_Exists(PlayerName(playerid))) return ShowPlayerDialog(playerid, 0,1,"Registration","Please type your desired password below:","Register","Exit Game");
    if(udb_Exists(PlayerName(playerid)) && !PlayerData[LoggedIn][playerid]) return ShowPlayerDialog(playerid, 1,1,"Login","Please type your password below:","Login","Exit Game");
OnDialogResponse
pawn Код:
if(dialogid == 0) {
      if(response) {
        new tmp[256], idx;
        tmp = strtok(inputtext, idx);
        if(udb_Create(PlayerName(playerid),tmp)) {
          dUserSetINT(PlayerName(playerid)).("placeholder",0);
            ShowPlayerDialog(playerid,1,1,"Login","Please type your password below:","Login","Exit Game");
            return 1;
            }
      }
      else {
      Kick(playerid);
    }
    }
This doesn't create a file though. Thanks for the help.
Reply


Forum Jump:


Users browsing this thread: