[pomoc]register

Započeo ‹Fox›, Septembar 30, 2010, 13:42:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ja sam napravio registraciju i imam rpoblem kad mu pokaze dialog sa Musko i Zensko i kliknem na musko sve je dobro a kad mu otvori za godine ja kliknem na nekolko godina i nece mi ic dalje ili nekad uspijem doc do drazav i izaberem drzavu i onda mi opet baci na godine
evo public dialog response

if(dialogid == ReGiStEr)
{
if(response)
{
    new file[128];
    new string[128];
    new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strlen(inputtext) == 0)
{
format(string, sizeof string, "Upisite lozinku!\n Tvoj account nije registriran! Molimo da se registrirate", name);
ShowPlayerDialog(playerid, ReGiStEr, DIALOG_STYLE_INPUT, "Registracija", string, "Register!", "Odustani.");
GivePlayerMoney(playerid, 2200);
return 0;
}
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file,"Password", udb_hash(inputtext));
dini_IntSet(file,"Score", GetPlayerScore(playerid));
dini_IntSet(file,"Deaths", PlayerInfo[playerid][pDeaths]);
    dini_IntSet(file,"Kills", PlayerInfo[playerid][pKills]);
    dini_IntSet(file,"AdminLevel", PlayerInfo[playerid][pAdmin]);
    dini_IntSet(file,"ServerTime", PlayerInfo[playerid][ServerTime]);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
ShowPlayerDialog(playerid, spol, DIALOG_STYLE_LIST, "Izaberite spol:", "Musko\nZensko", "Izaberi", "Odustani.");
}
}
}
if(dialogid == LoGiN)
{
if(response)
{
    new file[128];
    new string[128];
    new PlayerName[24];
if(strlen(inputtext) == 0)
{
    GetPlayerName(playerid, PlayerName, sizeof PlayerName);
    format(string, sizeof string, "Upisite lozinku \n\nDobrodosli %s! \nRegistrirani ste ! molimo da se ulogirate!!", PlayerName);
ShowPlayerDialog(playerid, LoGiN, DIALOG_STYLE_INPUT, "Login", string, "Login!", "Odustani.");
return 0;
}
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"%s.ini",name);
if(fexist(file))
{
    new password = dini_Int(file, "Password");
        if(udb_hash(inputtext) != password)
{
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  printf("%s has failed to login", name);
}
else
{
IsLogged[playerid] = 1;
ResetPlayerMoney(playerid);
SetPlayerScore(playerid, dini_Int(file,"Score"));
PlayerInfo[playerid][pAdmin] = dini_Int(file, "AdminLevel");
GivePlayerMoney(playerid, dini_Int(file,"Money"));
PlayerInfo[playerid][pDeaths] = dini_Int(file,"Deaths");
PlayerInfo[playerid][pKills] = dini_Int(file,"Kills");
PlayerInfo[playerid][ServerTime] = dini_Int(file,"ServerTime");
TimeTimer = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
TogglePlayerSpectating(playerid, 0);
}
}
}
}

if(dialogid == godine)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 10;
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 11;
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 12;
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 13;
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 14;
}
if(listitem == 5)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 15;
}
if(listitem == 6)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 16;
}
if(listitem == 7)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 17;
}
if(listitem == 8)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 18;
}
if(listitem == 9)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 19;
}
if(listitem == 10)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 20;
}
if(listitem == 11)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 21;
}
if(listitem == 12)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 22;
}
if(listitem == 13)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 23;
}
if(listitem == 14)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 24;
}
if(listitem == 15)
{
  PlayerInfo[playerid][pAge] = 25;
  ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
}
if(listitem == 16)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 26;
}
if(listitem == 17)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 27;
}
if(listitem == 18)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 28;
}
if(listitem == 19)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 29;
}
if(listitem == 20)
{
ShowPlayerDialog(playerid, drzava, DIALOG_STYLE_LIST, "Izaberite svoju drzavu:", "Hrvatska\nSrbija\nCrna Gora\nBosna i Hercegovina\nSlovenije\nNeka druga", "Izaberi", "Odustani.");
  PlayerInfo[playerid][pAge] = 30;
}
}
}
if(dialogid == drzava)
{
if(response)
{
if(listitem == 0)
{

PlayerInfo[playerid][pDrzava] = 1;
}
if(listitem == 1)
{

PlayerInfo[playerid][pDrzava] = 2;
}
if(listitem == 2)
{
PlayerInfo[playerid][pDrzava] = 3;
}
if(listitem == 4)
{
PlayerInfo[playerid][pDrzava] = 4;
}
if(listitem == 5)
{

PlayerInfo[playerid][pDrzava] = 5;
}
}
}
if(dialogid == spol)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][pSex] = 1;
ShowPlayerDialog(playerid, godine, DIALOG_STYLE_LIST, "Izaberite koliko imate godina:", "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30", "Izaberi", "Odustani.");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, godine, DIALOG_STYLE_LIST, "Izaberite koliko imate godina:", "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30", "Izaberi", "Odustani.");
PlayerInfo[playerid][pSex] = 2;
}
}
}