[Pomoc] RegLog System

Započeo MrDjPeca, Oktobar 22, 2016, 20:09:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moja od 0
Detaljan opis problema:Ne znam zasto mi se dialozi ne pojavljuju jedan za drugim.Stavio sam kada se igrac konektuje da mu pokaze dialog za register i za login ako ima account.I napravio sam ovo ondialogresponse i meni se samo taj dialog za register pokaze i nijedan drugi a namestio sam da se i ostali dialozi pokazu.Ako neko zna zasto ne radi nek mi napise.
Dio skripte: http://pastebin.com/74fFtMMG
Neke slike/video za lakse dobivanje pomoci(neobavezno):Nije potrebno

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_REGISTER)
{
if(!response) return Kick(playerid);
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT,"{FF0000}Age","\n{FF0000}___________________________________\n{FFFFFF}Please put your age to {FF0000}process.\n{FF0000}___________________________________","Ok","");
return 1;
}
else if(dialogid == DIALOG_AGE)
{
if(!response) return Kick(playerid);
new age, message[64];
age = strval(inputtext);
  if(age < 13 || age > 70)
    {
      ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT,"{FF0000}Age","{FFFFFF}Please put your age to {FF0000}process.","Ok","");
SendClientMessage(playerid, 0xFFFFFFFF, "You need to be older than 13");
return 1;
    }
      else
      {
        PlayerInfo[playerid][pAge] = age;
          format(message, sizeof(message), "So you are: %d. years old ?", age);
          SendClientMessage(playerid, 0xFFFFFFFF, message);
            ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_LIST,"{FF0000}Sex","Male\nFemale","Ok","");
            return 1;
        }
}
else if(dialogid == DIALOG_SEX)
{
    if(!response) return Kick(playerid);
new message[64];
  if(listitem == 0)
    {
PlayerInfo[playerid][pSex] = 0;
    format(message, sizeof(message), "Okay you are {FF0000}Male");
SendClientMessage(playerid, 0xFFFFFFFF, message);
    PlayerInfo[playerid][pSkin] = 20;
      printf("Skin has been set to 20");
ShowPlayerDialog(playerid, DIALOG_LOCATION, DIALOG_STYLE_LIST,"{FF0000}Chose spawn","Los Santos\nSan Fierro\nLas Venturas","Ok","");
return 1;
}
if(listitem == 1)
{
PlayerInfo[playerid][pSex] = 1;
    format(message, sizeof(message), "Okay you are {FF0000}Female");
      SendClientMessage(playerid, 0xFFFFFFFF, message);
      PlayerInfo[playerid][pSkin] = 12;
printf("Skin has been set to 12");
    ShowPlayerDialog(playerid, DIALOG_LOCATION, DIALOG_STYLE_LIST,"{FF0000}Chose spawn","Los Santos\nSan Fierro\nLas Venturas","Ok","");
    return 1;
}
}
else if(dialogid == DIALOG_LOCATION)
{
if(!response) return Kick(playerid);
new message[64];
if(listitem == 0)
{
      PlayerInfo[playerid][pLocation] = 0;
        format(message, sizeof(message), "Ok you are form {FF0000}Los Santos");
          SendClientMessage(playerid, 0xFFFFFFFF, message);
          SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1713.6101,-1912.2190,13.5669,85.9081, 0, 0, 0, 0, 0, 0);
            SpawnPlayer(playerid);
            return 1;
        }
        if(listitem == 1)
        {
        PlayerInfo[playerid][pLocation] = 1;
          format(message, sizeof(message), "Ok you are form {FF0000}San Fierro");
          SendClientMessage(playerid, 0xFFFFFFFF, message);
            SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1642.1584, -2334.1926, -2.6797, 359.7559, 0, 0, 0, 0, 0, 0);
            SpawnPlayer(playerid);
            return 1;
        }
        if(listitem == 2)
        {
        PlayerInfo[playerid][pLocation] = 2;
          format(message, sizeof(message), "Ok you are form {FF0000}Venturas");
          SendClientMessage(playerid, 0xFFFFFFFF, message);
            SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1642.1584, -2334.1926, -2.6797, 359.7559, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
}
else if(dialogid == DIALOG_LOGIN)
{
if(!response) return Kick(playerid);
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1642.1584, -2334.1926, -2.6797, 359.7559, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
    }
    }
return 1;
}

A gde pozivas te dialoge? Posalji to.. ShowPlayerDialog pogledaj

switch(dialogid)
{
    case DIALOG_LOGIN:
    {
        if(!response) return SetTimerEx("kick",1000,false,"d",playerid);
        if(response)
        {
            if(udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
            {
                INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);

                if(PlayerInfo[playerid][pRegistrovan] == 0)
{
                    new str[128];
                        format(str,sizeof(str), ""bela"Molimo vas upisite koliko imate godina.");
                ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""serverboja"Registracija",str,"Dalje","Quit");
                }
                else
                {
                SetSpawnInfo(playerid,PlayerInfo[playerid][pSkin],0,1716.68,-1682.20,20.20,0,0,0,0,0,0,0);
                SpawnPlayer(playerid);
                Ulogovan[playerid] = 1;
}
}
else
{
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""serverboja"Login",""bela"Upisali ste pogresnu lozinku\n"zelena"Molimo vas upisite svoju lozinku.","Login","Quit");
}
return 1;
}
    }
case DIALOG_REGISTER:
{
    if(!response) return SetTimerEx("kick",1000,false,"d",playerid);
        if(response)
        {
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""serverboja"Registracija",""bela"Dobrodosli na LifeZone RolePlay,\n\n"bela"Nemate registorovan nalog na ovom serveru.\n"zelena"Molimo vas unesite sifru za registraciju!","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Money",0);
INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Registrovan",0);
                INI_WriteInt(File,"Godine",0);
                INI_WriteInt(File,"Drzava",-1);
                INI_WriteInt(File,"Pol",0);
                INI_WriteInt(File,"Skin",0);
                INI_WriteInt(File,"Level",1);
                INI_WriteInt(File,"Exp",0);
                INI_WriteInt(File,"SatiIgre",0);
                INI_WriteInt(File,"PayDayPoeni",0);
                INI_WriteInt(File,"BankaNovac",0);
                INI_WriteInt(File,"BankaKartica",-1);
                INI_WriteInt(File,"Posao",0);
                INI_WriteInt(File,"PosaoUgovor",0);
INI_Close(File);
PlayerInfo[playerid][pDrzava] = -1;
PlayerInfo[playerid][pPassword] = udb_hash(inputtext);
new str[64];
format(str, sizeof(str), "Vasa sifra je "serverboja"["bela"%s"serverboja"]", inputtext);
SendClientMessage(playerid, bela1, str);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""serverboja"Registracija",""bela"Molimo vas ponovno upisite svoju lozinku.","Register","Quit");
}
}
case DIALOG_GODINE:
{
    if(!response) SetTimerEx("kick",1000,false,"d",playerid);
    if(response)
    {
        new god = strval(inputtext);
        if(god < 15) return ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""serverboja"Registracija",""bela"Molimo vas upisite koliko imate godina.","Dalje","Quit");
                if(god > MAX_GOD) return ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""serverboja"Registracija",""bela"Molimo vas upisite koliko imate godina.","Dalje","Quit");
PlayerInfo[playerid][pGodine] = god;
new str[64];
                format(str, sizeof(str), "Vi imate "serverboja"["bela"%d"serverboja"]"bela" godina.", PlayerInfo[playerid][pGodine]);
SendClientMessage(playerid, bela1, str);
ShowPlayerDialog(playerid,DIALOG_DRZAVA,DIALOG_STYLE_LIST,""serverboja"Registracij",""bela"Srbija\n"bela"Hrvatska\n"bela"BIH\n"bela"Ostalo","Dalje","Quit");
}
return 1;
}
case DIALOG_DRZAVA:
{
    if(!response) SetTimerEx("kick",1000,false,"d",playerid);
    if(response)
    {
        switch(listitem)
        {
              case 0:
            {
                PlayerInfo[playerid][pDrzava] = 0;
                SendClientMessage(playerid, bela1,"Vi ste iz"serverboja"["bela"Srbije"serverboja"]");
                ShowPlayerDialog(playerid,DIALOG_POL,DIALOG_STYLE_LIST,""serverboja"Registracija",""bela"Musko\n"bela"Zensko","Dalje","Quit");
return 1;
}
case 1:
            {
                PlayerInfo[playerid][pDrzava] = 1;
                SendClientMessage(playerid, bela1,"Vi ste iz"serverboja"["bela"Hrvatske"serverboja"]");
                ShowPlayerDialog(playerid,DIALOG_POL,DIALOG_STYLE_LIST,""serverboja"Registracija",""bela"Musko\n"bela"Zensko","Dalje","Quit");
return 1;
}
case 2:
            {
                PlayerInfo[playerid][pDrzava] = 2;
                SendClientMessage(playerid, bela1,"Vi ste iz"serverboja"["bela"Bosna i Hercegovine"serverboja"]");
                ShowPlayerDialog(playerid,DIALOG_POL,DIALOG_STYLE_LIST,""serverboja"Registracija",""bela"Musko\n"bela"Zensko","Dalje","Quit");
return 1;
}
case 3:
            {
                PlayerInfo[playerid][pDrzava] = 3;
                SendClientMessage(playerid, bela1,"Vi ste iz"serverboja"["bela"Neke druge drzave"serverboja"]");
                ShowPlayerDialog(playerid,DIALOG_POL,DIALOG_STYLE_LIST,""serverboja"Registracija",""bela"Musko\n"bela"Zensko","Dalje","Quit");
return 1;
}
        }
}
return 1;
}
case DIALOG_POL:
{
    if(!response) SetTimerEx("kick",1000,false,"d",playerid);
    if(response)
    {
        switch(listitem)
        {
              case 0:
            {
    PlayerInfo[playerid][pPol] = 1;
        SendClientMessage(playerid, bela1,"Vi ste "serverboja"["bela"Musko"serverboja"]");
new dialogstr[2056];
for (new i = 0, j = sizeof(Skinovim); i < j; i++)
{
format(dialogstr, sizeof(dialogstr), "%s%i\n\n", dialogstr, Skinovim[i]);
}
    ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_PREVMODEL, ""serverboja"Izabrei skin", dialogstr, "Izaberi", "Quit");
return 1;
}
case 1:
{
      PlayerInfo[playerid][pPol] = 2;
SendClientMessage(playerid, bela1,"Vi ste "serverboja"["bela"Zensko"serverboja"]");
new dialogstr[2056];
      for (new i = 0, j = sizeof(Skinoviz); i < j; i++)
{
format(dialogstr, sizeof(dialogstr), "%s%i\n\n", dialogstr, Skinoviz[i]);
}
    ShowPlayerDialog(playerid, DIALOG_SKIN, DIALOG_STYLE_PREVMODEL, ""serverboja"Izabrei skin", dialogstr, "Izaberi", "Quit");
return 1;
}
}
}
    return 1;
}
case DIALOG_SKIN:
{
    if(!response) SetTimerEx("kick",1000,false,"d",playerid);
    if (response)
{
if(PlayerInfo[playerid][pPol]  == 1)
{
    PlayerInfo[playerid][pSkin] = Skinovim[listitem];
            }
    if(PlayerInfo[playerid][pPol]  == 2)
{
    PlayerInfo[playerid][pSkin] = Skinoviz[listitem];
            }
                new str[200],dtxt[24],stxt[24];
    if(PlayerInfo[playerid][pDrzava] == 0) { dtxt = "Srbija";
}else if(PlayerInfo[playerid][pDrzava] == 1) { dtxt = "Hrvatska";
    }else if(PlayerInfo[playerid][pDrzava] == 2) { dtxt = "Bosna i Hercegovina";
}else if(PlayerInfo[playerid][pDrzava] == 3) { dtxt = "Ostalo"; }
        if(PlayerInfo[playerid][pPol] == 1) { stxt = "Musko";
}else if(PlayerInfo[playerid][pPol] == 2) { stxt = "Zensko"; }
format(str,sizeof(str),""serverboja"Pravila:\n"bela"Ovdje dodaj pravila\n"zelena"Zahvaljujemo vam se na registraciji\n\n\n"bela"Vasi podaci:\n"bela"Godine: "zelena"%d\n"bela"Drzava: "zelena"%s\n"bela"Pol: "zelena"%s",PlayerInfo[playerid][pGodine],dtxt,stxt);
    ShowPlayerDialog(playerid,DIALOG_PROVERA,DIALOG_STYLE_MSGBOX,""serverboja"Registracija",str,"Zavrsi","Ponovi");
SavePlayer(playerid);
}
}
case DIALOG_PROVERA:
{
    if(!response) return ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""serverboja"Registracija",""bela"Molimo vas upisite koliko imate godina.","Dalje","Quit");
if(response)
{
    PlayerInfo[playerid][pRegistrovan] = 1;
    Ulogovan[playerid] = 1;
    GivePlayerMoney(playerid,POCETNI_NOVAC);
    PlayerInfo[playerid][pMoney] = POCETNI_NOVAC;
    PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pLevel] = 1;
SetSpawnInfo(playerid,PlayerInfo[playerid][pSkin],0,1716.68,-1682.20,20.20,0,0,0,0,0,0,0);
        SpawnPlayer(playerid);
SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
PlayerInfo[playerid][pRegistrovan] = 1;
SavePlayer(playerid);
}
return 1;
}
}


Evo ti sto sam ja pravio pa edituj kako hoces


Jel ima neko neki log reg fs sa dialozima za pol,drzavu,sifru,email ili da vam posaljem skriptu pa ako mozete da popravite posto mi ne radi a nzm zasto  ::)