Dialog problems[Please urgent help] -
Dziugsas - 15.11.2014
Hello guys im having some problems here.
pawn Код:
public OnPlayerConnect(playerid)
{
pInfo[playerid][pLoggedIn] = false;
pInfo[playerid][pDead] = false;
InvalidNameKicker(playerid);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(pInfo[playerid][pConfirmed] == true)
{
new string[200];
GetPlayerIp(playerid, pInfo[playerid][pIpAddress], 16);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vardas : "COL_RED"%s\n"COL_LIGHTBLUE"IP Adresas : "COL_RED"%s\n"COL_LIGHTBLUE"Paskutinis prisijungimas : "COL_RED"%s\n\n"COL_GREEN"Sveiki sugrize!Iveskite slaptazodi.", GetName(playerid),pInfo[playerid][pIpAddress],pInfo[playerid][pLastLogin]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_RED"-= "COL_GREEN"Las Venturas Realus Gyvenimas "COL_RED"=-",string,"Prisijungti","Iseiti");
}
else
{
new string[200];
GetPlayerIp(playerid, pInfo[playerid][pIpAddress], 16);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vardas : "COL_RED"%s\n"COL_LIGHTBLUE"IP Adresas : "COL_RED"%s\n\n"COL_GREEN"Prasome ivesti patvirtinimo koda.", GetName(playerid),pInfo[playerid][pIpAddress]);
ShowPlayerDialog(playerid, DIALOG_REGISTER_2, DIALOG_STYLE_INPUT,""COL_RED"-= "COL_GREEN"Las Venturas Realus Gyvenimas "COL_RED"=-",string,"Gerai","Iseiti");
pInfo[playerid][pRegistering] = true;
}
}
else
{
new string[200],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, pInfo[playerid][pIpAddress], 16);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vardas : "COL_RED"%s\n"COL_LIGHTBLUE"IP Adresas : "COL_RED"%s\n\n"COL_GREEN"Prasome ivesti savo elektronini pasta.", GetName(playerid),pInfo[playerid][pIpAddress]);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_RED"-= "COL_GREEN"Las Venturas Realus Gyvenimas "COL_RED"=-",string,"Gerai","Iseiti");
}
return 1;
}
And here:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(pInfo[playerid][pLoggedIn] == false && pInfo[playerid][pNewPlayer] == false && pInfo[playerid][pRegistering] == false)
{
new string[200],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, pInfo[playerid][pIpAddress], 16);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vardas : "COL_RED"%s\n"COL_LIGHTBLUE"IP Adresas : "COL_RED"%s\n"COL_LIGHTBLUE"Paskutinis prisijungimas : "COL_RED"%s\n\n"COL_RED"Pirmausia turite prisijungti!", pName,pInfo[playerid][pIpAddress],pInfo[playerid][pLastLogin]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_RED"-= "COL_GREEN"Las Venturas Realus Gyvenimas "COL_RED"=-",string,"Prisijungti","Iseiti");
}
else if(pInfo[playerid][pNewPlayer] == true)
{
SpawnPlayer(playerid);
}
else if(pInfo[playerid][pEmail] == 0 && pInfo[playerid][pRegistering] == true)
{
new string[200];
GetPlayerIp(playerid, pInfo[playerid][pIpAddress], 16);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vardas : "COL_RED"%s\n"COL_LIGHTBLUE"IP Address : "COL_RED"%s\n\n"COL_RED"Neteisingai ivestas el. pastas!", GetName(playerid),pInfo[playerid][pIpAddress]);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_RED"-= "COL_GREEN"Las Venturas Realus Gyvenimas "COL_RED"=-",string,"Gerai","Iseiti");
}
else if(pInfo[playerid][pSecurityQuestion] == 0 && pInfo[playerid][pRegistering] == true)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER_3, DIALOG_STYLE_INPUT, "Apsauginis klausimas", ""COL_RED"Prasome ivesti tinkama klausima!", "Gerai", "");
}
else if(pInfo[playerid][pSecurityAnswer] == 0 && pInfo[playerid][pRegistering] == true)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER_4, DIALOG_STYLE_INPUT, "Apsauginio klausimo atsakymas", ""COL_RED"Prasome ivesti atsakyma!", "Gerai", "Grizti");
}
else if(pInfo[playerid][pPass] == 0 && pInfo[playerid][pRegistering] == true)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER_5, DIALOG_STYLE_INPUT,"Slaptazodis",""COL_RED"Prasome pasirinkti saugu ir sunku slaptazodi!","Gerai","Grizti");
}
return 0;
}
The problem is that i want to player type all the requeried data and then spawn , but if they type wrong characters or something it doesnt show same dialog , it skips to login dialog even if Registering variable is true...Where is my code bug?