Help Needed
#1

stuck on how to add this into my GM

pawn Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
    new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
    if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
    else
    {
        //show your login dialog
    }
    return 1;
}
My GM
pawn Код:
public OnPlayerConnect(playerid)
{
    if( fexist ( user_account_path ( playerid ) ) )
    {
        INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
    }

    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
    }
    userData[ playerid ][ Admin_Level ] = 0;
    userData[ playerid ][ Money ] = 0;
    userData[ playerid ][ Deaths ] = 0;
    userData[ playerid ][ Score ] = 0;
    return 1;
}
Can anyone help?
Reply
#2

Not sure because I don't use that but..


Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
    new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
    if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
    else
    {
        if( fexist ( user_account_path ( playerid ) ) )
    {
        INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
    }
    userData[ playerid ][ Admin_Level ] = 0;
    userData[ playerid ][ Money ] = 0;
    userData[ playerid ][ Deaths ] = 0;
    userData[ playerid ][ Score ] = 0;
    }
    return 1;
}
Reply
#3

pawn Код:
public OnPlayerConnect(playerid)
{//you will need to put the fexist to check if the player have registered before this
    new INI:File = INI_Open(UserPath(playerid));//and put the shit below when the dialog shows instead checking a something that does not exist
    if(PlayerInfo[playerid][pBanned] == 1) return Ban(playerid); //now he's REALLY banned!
    else
    {
        if( fexist ( user_account_path ( playerid ) ) )
        {
            INI_ParseFile(user_account_path ( playerid ), "load_user_%s", .bExtra = true, .extra = playerid);
            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Welcome.Please log-in",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to log-in", #Log-in, #Quit);
        }
        else
        {
            ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Please register!",""COLOR_WHITE"Type your "COLOR_GREEN"password "COLOR_WHITE"here to register.", #Register, #Quit);
        }
        userData[ playerid ][ Admin_Level ] = 0;
        userData[ playerid ][ Money ] = 0;
        userData[ playerid ][ Deaths ] = 0;
        userData[ playerid ][ Score ] = 0;
        }
    return 1;
}
Late!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)