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


Messages In This Thread
Help Needed - by semaj - 10.06.2013, 22:44
Re: Help Needed - by whando - 11.06.2013, 00:07
Re : Help Needed - by NeoPro - 11.06.2013, 00:11

Forum Jump:


Users browsing this thread: 1 Guest(s)