Help please.. Need help.. + rep Wit Quiz..
#1

So the problem is it shows up when you need to login but I need it when player is registered before login it shows up and player need to answer questions.

And another question how I can save that player is answered all questions and he didn't have to do again...

On my player saving.. and loading maybe you can help me out..

Код:
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Quiz",PlayerInfo[playerid][pQuiz]);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Quiz",PlayerInfo[playerid][pQuiz]);
    INI_Close(File);
    return 1;
}
Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
        SendClientMessage(playerid, -1,"You will have to pass through a quiz"); // Added -1 color as default.
		ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?"," Real Pussy \n Role Play \n Real Money","Select","Leave Game");
		QuizAnswers[playerid] = 0; // We set the player quiz answers to 0 when he connects.
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)