If the player disconnected.
#1

Hello

I stuck with my roleplay registration system.
When I registering to my server and exit in the middle of the questionnaire and get back to the game,it tells me to log in and I didn't finish the registration..
In the player log it was like this when I logout the server:
[pawm]
Registed = 0
[/pawn]
and its great but when I enter my server it ask me to log in and not to register..

Here is my registration code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
       if (RegistrationStep[playerid] == 0)
       {
        new plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
        new string[256];
        format(string, sizeof(string), "Database/%s.ini", plname);
        if(!fexist(string))
        {
            PlayerInfo[playerid][pRegisted] = 0;
        }
        else if(fexist(string))
        {
            PlayerInfo[playerid][pRegisted] = 1;
        }
        if(fexist(string))//gPlayerAccount[playerid] != 0)
        {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"You are already registered, write your chosen password to log in! ","Login","Quit");
        }
        else if(!fexist(string))
        {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Welcome to CHANGEME, Our database tell us your new here, chose your password to register!","Register","Quit");
        }
    }
    else SpawnPlayer(playerid);
    return 1;
}
Thank you guys <3
Reply


Messages In This Thread
If the player disconnected. - by dorperez - 22.04.2013, 17:10
Re: If the player disconnected. - by RaZzZzoR - 22.04.2013, 17:20
Re: If the player disconnected. - by dorperez - 22.04.2013, 17:27
AW: If the player disconnected. - by HurtLocker - 22.04.2013, 18:06
Re: AW: If the player disconnected. - by dorperez - 22.04.2013, 18:19
AW: If the player disconnected. - by HurtLocker - 22.04.2013, 18:26
Re: AW: If the player disconnected. - by dorperez - 22.04.2013, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)