Name length problem.
#1

On my server when your name is too long it tells you to register every time, it creates your player file, but it doesnt read it or something when name is like AAAAAAAAAAAA

Short names work fine: This decides to show login or register menu:

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[MAX_PLAYER_NAME];
    new plname[MAX_PLAYER_NAME];
    gPlayerAccount[playerid] = 0;
    RegistrationStep[playerid] = 0;
    gPlayerLogged[playerid] = 0;
    PlayerInfo[playerid][pLevel] = 0;
    PlayerInfo[playerid][pCash] = 0;
    PlayerInfo[playerid][pReg] = 0;
    CurrentMoney[playerid] = 0;
    gPlayerLogTries[playerid] = 0;
    gActivePlayers[playerid]++;
    SetPlayerColor(playerid,COLOR_GRAD2);
    GetPlayerName(playerid, plname, sizeof(plname));
    ONazwa[playerid]=plname;
    format(string, sizeof(string), "Konta/%s.ini", plname);
    if(fexist(string))
    {
        gPlayerAccount[playerid] = 1;//show login
    }
    else
    {
        gPlayerAccount[playerid] = 0;//show register
    }
    return 1;
}
showing the login bit:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
//  new string[128];
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);

        if (gPlayerAccount[playerid] != 0)
        {
        //  SetPlayerCameraPos(playerid, 1111.3206,-1324.8296,72.4714);
        //  SetPlayerCameraLookAt(playerid, 1111.4764,-1537.8735,29.9035);
            ShowPlayerDialog(playerid, LOGOWANIE, DIALOG_STYLE_PASSWORD, "Logowanie", "Witaj na polskim serwerze role play true life, ta postac jest\n zarejestrowana, wpisz haslo aby sie zalogowac:", "Zaloguj", "Wyjdz");
        }
        else
        {
        //  SetPlayerCameraPos(playerid, 1111.3206,-1324.8296,72.4714);
        //  SetPlayerCameraLookAt(playerid, 1111.4764,-1537.8735,29.9035);
            ShowPlayerDialog(playerid, REJESTRACJA, 1, "Rejestracja", "Witaj na Polskim Serwerze Role Play True Life, ta postac nie jest jeszcze\n zarejestrowana, aby ja zarejestrowac wpisz ponizej haslo dla tej postaci:", "Zarejestruj", "Wyjdz");
        }
    }
    else
    {
        SpawnPlayer(playerid);
    }
    return 0;
}
Reply


Messages In This Thread
Name length problem. - by HondaCBR - 28.12.2011, 00:47
Re: Name length problem. - by pmkrz - 28.12.2011, 00:50
Re: Name length problem. - by MP2 - 28.12.2011, 00:50
Re: Name length problem. - by HondaCBR - 28.12.2011, 00:56
Re: Name length problem. - by pmkrz - 28.12.2011, 02:21
Re: Name length problem. - by XFlawless - 28.12.2011, 02:25
Re: Name length problem. - by MP2 - 28.12.2011, 03:07

Forum Jump:


Users browsing this thread: 2 Guest(s)