SA-MP Forums Archive
Login in problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Login in problem (/showthread.php?tid=433127)



Login in problem - [L]azy[H]aze - 26.04.2013

Hi iv tried to add a quiz to my roleplay gamemode but when i add it it shows the quiz on start up but after i fill out the quiz it dosen't show the login or register dialog
Quote:

public OnPlayerConnect(playerid)
{
new string[128];
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD, "Login","Welcome back to Project Reality.\n\nThat name is registered. Please enter your password below.","Login","Quit"); //login
format(string, sizeof(string), ""COL_WHITE"Welcome back to "COL_YELLOW"Project Reality, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
SendClientMessage(playerid, -1, string);
}
else
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD, "Register","Welcome to Project Reality.\n\nPlease register your account by typing the password below.","Register","Quit");
format(string, sizeof(string), ""COL_WHITE"Welcome to "COL_YELLOW"Project Reality, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
SendClientMessage(playerid, -1, string);
}
if(!IsValidName(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pAdmin] < 2)
{
format(string, sizeof(string), "AdmCmd: %s has been kicked by NameChecker, reason: Invalid name format.", GetName(playerid));
SendClientMessage(playerid, COLOR_LIGHTRED, "You've been kicked by NameChecker, reason: Invalid name format. (Firstname_Lastname)");
Kick(playerid);
}
{
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; //
}
SetPlayerInterior(playerid,0);
TogglePlayerSpectating(playerid, 1);
gPlayerLogged[playerid] = 1;
return 1;
}




Re: Login in problem - Gomuk - 27.04.2013

Try changing the DialogID