Jump to content
  • 0

Problema Login/Register,wrong password


Beside

Question

Am o problema la login/register..cred ca e de la dialog.Prima data daca intru si ma loghez merge,daca inchid apoi incerc iaras mi arata ca password e gresita.Daca dau restart la server merge :| ma ajutati pls?

//-----------------De la login...

else

{

new loginstring[128];

new loginname[64];

GetPlayerName(playerid,loginname,sizeof(loginname));

format(loginstring,sizeof(loginstring),"Password doesn't match your name!\n\nPlease reenter your password below to login to your account.",loginname);

ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");

            SetPlayerFacingAngle(playerid, 3.41);

            SetPlayerCameraPos(playerid, 1230.90, -1287.72, 254.17);

            SetPlayerCameraLookAt(playerid, 1227.04, -1289.05, 251.27);

        fclose(UserFile);

        gPlayerLogTries[playerid] += 4;

        if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }

        return 1;

}

//-----------------De la Onplayer Request class

public OnPlayerRequestClass(playerid, classid)

{

if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)

{

if (gPlayerAccount[playerid] != 0)

{

gPlayerAccount[playerid] = 1;

new loginstring[500];

new loginname[64];

GetPlayerName(playerid,loginname,sizeof(loginname));

new lastlogin[64];

lastlogin = PlayerInfo[playerid][pLastLogin];

format(loginstring,sizeof(loginstring),"{BECBFC}Welcome back, {95A3FF}%s{BECBFC}!\n\nPlease enter your password below to login to your account. \n\n{FFFFFF}* Last Login: %s *",loginname,lastlogin);

ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");

}

else

{

gPlayerAccount[playerid] = 0;

new regstring[256];

new regname[64];

GetPlayerName(playerid,regname,sizeof(regname));

format(regstring,sizeof(regstring),"{BECBFC}Welcome, {95A3FF}%s{BECBFC}! \n\nThis name is not registered so please register with entering a password below.\n\n{C11B17}You should choose a strong password, between 6 and 32 characters.",regname);

ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");

}

SetPlayerFacingAngle(playerid, 3.41);

  SetPlayerCameraPos(playerid, 1230.90, -1287.72, 254.17);

  SetPlayerCameraLookAt(playerid, 1227.04, -1289.05, 251.27);

  PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);

PlayerInfo[playerid][pModel] = Peds[classid][0];

}

return 1;

}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.