[POMOC]Registracija

Započeo Kavasaki, Jun 26, 2011, 23:01:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GTARP
Detaljan opis problema: Pa ovako sjebo sam nestho ono kada nisi registriran pa kada ulazis pita te da se registriras i sve i posle da te pita dali si musko,drzava,godine itd..
Ja sam nestho dirao ali nisam nistha dirao oko registrationstep sam mislim nestho dirao to davno i ocu sada cim se registriram mi trazi to.
Znachi ocu kada se register da me pita dali sam musko,godine,drzava sve to imam ali oko registrationstep sam nestho sjebo
Evo COD i dajte mi ispravni cod da mi ispravno radi.
if(dialogid == SPOL) // Spol
{
    if(RegistrationStep[playerid] == 2)
    {
    if(response)
    {
if(listitem == 0) // Musko
    {
        PlayerInfo[playerid][pSex] = 1;
        ShowPlayerDialog(playerid, GODINE, DIALOG_STYLE_LIST, "Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n11 \n19 \n20 \n21 \n22 \n23 \n24 \n25", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 2;
    }
    if(listitem == 1) // Zensko
    {
        PlayerInfo[playerid][pSex] = 2;
        ShowPlayerDialog(playerid, GODINE, DIALOG_STYLE_LIST, "Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n11 \n19 \n20 \n21 \n22 \n23 \n24 \n25 \n26 \n27 \n28 \n29 \n30 \n31 \n32 \n33 \n34 \n35", "Odaberi[Choose]", "Odustani[exit]");
        RegistrationStep[playerid] = 2;
    }
    if(listitem == 2) // Kick
    {
        Kick(playerid);
    }
    }
return 1;
             }
}
if(dialogid == GODINE) // Dob
{
        if(RegistrationStep[playerid] == 3)
    {
            if(response)
    {
        if(listitem == 0)
    {
        PlayerInfo[playerid][pAge] = 9;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 1)
    {
        PlayerInfo[playerid][pAge] = 10;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 2)
    {
        PlayerInfo[playerid][pAge] = 11;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 3)
    {
        PlayerInfo[playerid][pAge] = 12;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 4)
    {
        PlayerInfo[playerid][pAge] = 13;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 5)
    {
        PlayerInfo[playerid][pAge] = 14;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 6)
    {
        PlayerInfo[playerid][pAge] = 15;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
                            }
    if(listitem == 7)
    {
        PlayerInfo[playerid][pAge] = 16;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 8)
    {
        PlayerInfo[playerid][pAge] = 17;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 9)
    {
        PlayerInfo[playerid][pAge] = 18;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 10)
    {
        PlayerInfo[playerid][pAge] = 19;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 11)
    {
        PlayerInfo[playerid][pAge] = 20;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
                            if(listitem == 12)
    {
        PlayerInfo[playerid][pAge] = 21;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 33;
    }
    if(listitem == 13)
    {
        PlayerInfo[playerid][pAge] = 22;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 14)
    {
        PlayerInfo[playerid][pAge] = 23;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 15)
    {
        PlayerInfo[playerid][pAge] = 24;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
    if(listitem == 16)
    {
        PlayerInfo[playerid][pAge] = 25;
        ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "Odakle ste?", "Hrvatska \nSrbija \nKosovo \nCrna Gora \nSlovenija \nBosna i Hercegovina", "Odaberi", "Odustani");
        RegistrationStep[playerid] = 3;
    }
            if(listitem == 17) // Kick
    {
                    Kick(playerid);
    }
}
}
return 1;
}
if(dialogid == DRZAVA) // Drzava
{
    if(RegistrationStep[playerid] == 4)
    {
    if(response)
    {
    if(listitem == 0) // HR
    {
        PlayerInfo[playerid][pOrigin] = 1;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 1) // SRB
    {
        PlayerInfo[playerid][pOrigin] = 2;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 2) // Kosovo
    {
        PlayerInfo[playerid][pOrigin] = 3;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 3) // CG
    {
        PlayerInfo[playerid][pOrigin] = 4;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 4) // Slovenija
    {
        PlayerInfo[playerid][pOrigin] = 5;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 5) // BiH
    {
        PlayerInfo[playerid][pOrigin] = 6;
        RegistrationStep[playerid] = 4;
        return 0;
    }
    if(listitem == 6) // Kick
    {
                    Kick(playerid);
    }
    }
}
}
return 1;
}


Ovo dalje je kod SetPLayerSpawn pa sam tu naso vezi musko i zensko
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
    SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
if(PlayerInfo[playerid][pTut] == 0)
    {
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "DobrodoÅ¡li na  server, molim vas ispunite podatke.");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Kojeg ste spola?", "Zensko \nMusko", "U redu", "Odustani");

    }


HVALA NA pOMOCI UNAPRED

Dio skripte: otkud znam xd
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
0 Bodova za ovaj potpis

na pogresno mjesto si dodao registraciju
{
                    PutPlayerInTutorial(playerid, 1);
                }
             }
          }
          case 105:
          {
              switch(listitem)
              {
                  case 0:
                  {
                      SendClientMessage(playerid, WHITE, "Alright, let's get stuck in then. ");
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                      SendClientMessage(playerid, WHITE, "INTRODUCTION");
                      SendClientMessage(playerid, WHITE, "Welcome to the server tutorial. This tutorial was created to help you around the server, so you know where things");
                      SendClientMessage(playerid, WHITE, "are, and the basic parts of game play on our server - we have quite a few very unique features you may not be used to.");
                      SendClientMessage(playerid, GREY, "Please type \"next\" in the chatbox, when you have fully read this section.");
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");

                      Player[playerid][ServerTut] = 1;
                  }
                  case 1:
                  {
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                      ShowPlayerDialog(playerid, 106, DIALOG_STYLE_LIST, "Please Specify Your Gender", "Male\nFemale", "Select", "Cancel");
                      SendClientMessage(playerid, WHITE, "Roger that, so let's get a bit of vital information before you can spawn!");
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                  }
              }
          }
          case 106:
          {
              switch(listitem)
              {
                  case 0:
                  {
                      Player[playerid][Gender] = 1;
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                      ShowPlayerDialog(playerid, 107, DIALOG_STYLE_LIST, "Please Specify Your Age", "18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40", "Select", "Cancel");
                      SendClientMessage(playerid, WHITE, "Okay, so you're a dude. Let's just get your character's age and then you can spawn!");
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                  }
                  case 1:
                  {
                      Player[playerid][Gender] = 2;
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                      ShowPlayerDialog(playerid, 107, DIALOG_STYLE_LIST, "Please Specify Your Age", "18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40", "Select", "Cancel");
                      SendClientMessage(playerid, WHITE, "Okay, so you're a chick. Let's just get your character's age and then you can spawn!");
                      SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
                  }
              }
          }
          case 107:
          {
              new string[128];
              listitem += 18;
              Player[playerid][Age] = listitem;
              Player[playerid][Tutorial] = 0;
              SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
              format(string, sizeof(string), "Okay, so your character is %d.", Player[playerid][Age]);
              SendClientMessage(playerid, WHITE, string);
              SendClientMessage(playerid, WHITE, "Now, we can let you spawn. We hope that you enjoy your experience here and play here regularly.");
              SendClientMessage(playerid, WHITE, "If you have any server-related questions, please use /n. If you wish to just have a chat, please use /o");
               SendClientMessage(playerid, GREY, "-----------------------------------------------------------------------------------------------------------------");
               
               PutPlayerInTutorial(playerid, 99);
          }
          case 1195:
         {
             if(strcmp(inputtext, "yes", true) == 0)
            {
               ShowPlayerDialog(playerid, 3895, DIALOG_STYLE_INPUT, "Registration", "Please enter your password to register your account.", "Register", "Cancel");
               SendClientMessage(playerid, ANNOUNCEMENT, "You will automatically be logged in, once you have registered.");
            }
            else
            {
                SendClientMessage(playerid, WHITE, "Incorrect - You may not play.");
                Kick(playerid);
            }
          }
//-----------------------------------------------------------------------------------------------------------------
et ti kompletna registracija et ako pokusaj pa javi jer sam imao i ja isti problea i rijesio na ovaj nacin
et to kopiraj ispod ovog negdje na sredinu
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

ipak da pokusam pomoc jer sam imao isti problema pa ne smeta valjda odg ako mogne mogne ako nemogne nikom nista :D
Poslednja Izmena: Jul 18, 2011, 12:31:41 POSLE PODNE od Aldin Begovic