11.08.2012, 16:23
ok. add this to OnDialogResponse after Switch(dialogid)
and replace OnPlayerConnect with this:
pawn Код:
case DIALOG_REG:
{
if(response)
{
if(!INI_Exists(string))
{
format(dialog, sizeof(dialog),""COL_BLUE"Select and enter the password\nyou want to use for your account.", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD,""COL_YELLOW"Registration - 2. step", dialog, "Registration", "Quit");
}
else
{
format(dialog, sizeof(dialog),""COL_BLUE"Welcome back, %s!\n\nInsert a password of your account\nand login.", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_PASSWORD, ""COL_YELLOW"Xoomer - Login",dialog, "Login", "Quit");
}
}
else Kick(playerid);
}
case DIALOG_JEZIK:
{
if(response)
{
if(!INI_Exists(string))
{
format(dialog, sizeof(dialog),""COL_BLUE"Odaberite i unesite lozinku koju želite\nkoristiti za svoj korisnički račun.", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_YELLOW"Registracija - 2. korak", dialog, "Registracija", "Izađi");
}
else
{
format(dialog, sizeof(dialog),""COL_BLUE"Dobrodošli natrag, %s!\n\nMolimo da unesete lozinku vaseg korisničkog\nračuna i da se prijavite.", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""COL_YELLOW"Xoomer - Login",dialog, "Login", "Izadji");
}
else Kick(playerid);
}
pawn Код:
public OnPlayerConnect(playerid)
{
new dialog[128], string[128];
format(string, 35, Player_File, GetName(playerid));
format(dialog, sizeof(dialog),"English: Choose the language to use for your account\nHrvatski: Izaberite jezik koji biste koristili za vaš korisnički račun", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_JEZIK, DIALOG_STYLE_LIST, "Registration - 1. step", dialog, "Next", "Quit");
SetPVarInt(playerid, "Join", 1);
return 1;
}

