Jump to content

Problema register/login


Andrei_Jr

Recommended Posts

Problema intalnita (descriere):Am laut gamemode'ul Bigzone ultima versiune de pe net,si nu ma lasa sa fac cont imi tot spune ca e parola gresita l-am pus si pe mysql si degeaba..
Ero(area / rile) / warning-(ul / urile):nu imi da erori nici warning'uri
Liniile de cod / sursa / script-ul(obligatoriu):

    else
    {
        new stringyy[320],
            loginname[64];
        GetPlayerName(playerid,loginname,sizeof(loginname));
        gPlayerLogTries[playerid] -= 1;
        if(gPlayerLogTries[playerid] == 1 || gPlayerLogTries[playerid] == 0)
        {
            format(stringyy,sizeof(stringyy),"{FF0000}Incorrect password. You have %d remaining login attempts left.", gPlayerLogTries[playerid]);
            SendClientMessage(playerid, COLOR_RED, stringyy);
        }
        ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"SERVER: Login","Welcome to the HardGaming RPG Server.\n\nPlease enter your password below!","Login","Cancel");
        if(gPlayerLogTries[playerid] == -1)
        {
            new stringkick[256];
            format(stringkick, sizeof(stringkick), "AdmWarn: {FFFFFF}%s has been kicked for entering the wrong password 2 times.",loginname);
               ABroadCast(COLOR_RED2,stringkick,1);
            KickEx(playerid);
        }
        return 1;
    }


Imagini / Video (optional):-
Ati incercat sa rezolvati singur?: da dar nu am reusit..

Link to comment
Share on other sites

public OnPlayerRequestClass(playerid, classid)
{
    if(gPlayerLogged[playerid] == 1)
    {
        if(ChosenSkin[playerid] == 1) return SpawnPlayer(playerid);

    }
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
         SetPlayerInterior(playerid,0);
        SetPlayerPosEx(playerid, 1742.9814,-1863.0938,16.2048);
        InterpolateCameraPos(playerid, 1804.1313,-1732.0179,21.7294, 1037.3715,-1732.7358,25.2859, 30000, CAMERA_MOVE);
        InterpolateCameraLookAt(playerid,1441.6654,-1732.0317,18.0373,1037.3715,-1732.7358,25.2859, 30000, CAMERA_MOVE);
        TogglePlayerControllable(playerid, 0);
        if (gPlayerAccount[playerid] != 0)
        {
            SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}Welcome to HardGaming RPG.");
            SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}You already have a registered account, please enter your password into the dialog box.");
            ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"SERVER: Login","Welcome to the HardGaming RPG Server.\n\nPlease enter your password below!","Login","Cancel");
        }
        else
        {
            gPlayerAccount[playerid] = 0;
             new loginname[158],
            stringgg[300];
            GetPlayerName(playerid,loginname,sizeof(loginname));
            for(new clanid; clanid < MAX_CLANS; clanid++)
            {
                if(strfind(loginname,ClanInfo[clanid][cClanTag],true) != -1)
                {
                    format(stringgg,sizeof(stringgg),"Nu poti folosi acel username. '%s' este inregistrat de un clan. Nu poti folosi acel cuvant in nickname-ul tau.",ClanInfo[clanid][cClanTag]);
                    SendClientMessage(playerid, COLOR_RED, stringgg);
                    format(stringgg,sizeof(stringgg),"You can't use that username! '%s' is a registered clan tag. You can't use that word in your nickname.",ClanInfo[clanid][cClanTag]);
                    SendClientMessage(playerid, COLOR_RED, stringgg);
                    KickEx(playerid);
                }
            }
            SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}Welcome to HardGaming RPG.");
            SendClientMessage(playerid, COLOR_GENANNOUNCE, "SERVER: {FFFFFF}You aren't registered yet. Please enter your desired password in the dialog box to register.");
            ShowPlayerDialog(playerid,DIALOG_LOGIN1,DIALOG_STYLE_PASSWORD,"SERVER: Registration","Welcome to the HardGaming RPG Server.\n\nPlease enter your desired password below!","Register","Cancel");
        }
        login[playerid] = SetTimerEx("Logink",60000,false,"d",playerid);
    }
    else if(IsPlayerNPC(playerid)) return 1;
    return 1;
}

 

------

 

    else
    {
        new stringyy[320],
            loginname[64];
        GetPlayerName(playerid,loginname,sizeof(loginname));
        gPlayerLogTries[playerid] -= 1;
        if(gPlayerLogTries[playerid] == 1 || gPlayerLogTries[playerid] == 0)
        {
            format(stringyy,sizeof(stringyy),"{FF0000}Incorrect password. You have %d remaining login attempts left.", gPlayerLogTries[playerid]);
            SendClientMessage(playerid, COLOR_RED, stringyy);
        }
        ShowPlayerDialog(playerid,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"SERVER: Login","Welcome to the HardGaming RPG Server.\n\nPlease enter your password below!","Login","Cancel");
        if(gPlayerLogTries[playerid] == -1)
        {
            new stringkick[256];
            format(stringkick, sizeof(stringkick), "AdmWarn: {FFFFFF}%s has been kicked for entering the wrong password 2 times.",loginname);
               ABroadCast(COLOR_RED2,stringkick,1);
            KickEx(playerid);
        }
        return 1;
    }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.