Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new sendername[MAX_PLAYER_NAME];
- new string[128];
- if(response)
- {
- if(dialogid == UVJETI)
- {
- new pocetaksrting[200];
- new pocetakname[64];
- GetPlayerName(playerid,pocetakname,sizeof(pocetakname));
- format(pocetaksrting,sizeof(pocetaksrting),"{FF0000}%s \n{FFFFFF}Vas korisnicki racun nije pronadjen u bazi podataka.\nNakon sto se prihvatili uvjete koristenja, vrijeme je da registrirate svoj korisnicki racun.",pocetakname);
- ShowPlayerDialog(playerid,POCETAK,DIALOG_STYLE_MSGBOX,"{00FF00}Pocetak registacije korisnickog imena",pocetaksrting,"U redu","Odustani");
- }
- if(dialogid == POCETAK)
- {
- new regstring[200];
- new regname[64];
- GetPlayerName(playerid,regname,sizeof(regname));
- format(regstring,sizeof(regstring),"{0000FF}%s\n\n{FFCC00}Korisnicki racun{FFFFFF}: Nemate.\n\nMolimo vas da ispod upisite svoju {FF0000}lozinku {FFFFFF}kako bi registrirali vas korisnicki racun:",regname);
- ShowPlayerDialog(playerid,REGISTRACIJA,DIALOG_STYLE_INPUT,"{00FF00}Registacije korisnickog imena |1.Korak|",regstring,"Registriraj se","Odustani");
- }
- if(dialogid == REGISTRACIJA)
- {
- if(strlen(inputtext))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "users/%s.ini", sendername);
- new File: hFile = fopen(string, io_read);
- if (hFile)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ovo korisnicko ime je zauzeto, molimo odaberite neko drugo!");
- fclose(hFile);
- return 1;
- }
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- //Encrypt(tmppass);
- OnPlayerRegister(playerid,tmppass);
- }
- else
- {
- new regstring[200];
- new regname[64];
- GetPlayerName(playerid,regname,sizeof(regname));
- format(regstring,sizeof(regstring),"{0000FF}%s\n\n{FFCC00}Korisnicki racun{FFFFFF}: Nemate.\n\nMolimo vas da ispod upisite svoju {FF0000}lozinku {FFFFFF}kako bi registrirali vas korisnicki racun:",regname);
- ShowPlayerDialog(playerid,REGISTRACIJA,DIALOG_STYLE_INPUT,"{00FF00}Registacije korisnickog imena |1.Korak|",regstring,"Registriraj se","Odustani");
- }
- if(PlayerInfo[playerid][pTut] == 0)
- {
- gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- RegistrationStep[playerid] = 1;
- ClearChatbox(playerid, 8);
- ShowPlayerDialog(playerid,SPOL,DIALOG_STYLE_LIST,"Kojeg ste spola?","Musko \nZensko","Odaberi","Odustani");
- }
- }
- if(dialogid == SPOL)
- {
- if(RegistrationStep[playerid] == 1)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pSex] = 1;
- ShowPlayerDialog(playerid, GODINE, DIALOG_STYLE_LIST, "{FFFFFF}Koliko godina imate?", "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 2;
- }
- if(listitem == 1)
- {
- PlayerInfo[playerid][pSex] = 2;
- ShowPlayerDialog(playerid, GODINE, DIALOG_STYLE_LIST, "{FFFFFF}Koliko godina imate?", "10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 2;
- }
- if(listitem == 2)
- {
- Kick(playerid);
- }
- }
- }
- if(dialogid == GODINE)
- {
- if(RegistrationStep[playerid] == 2)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pAge] = 10;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 1)
- {
- PlayerInfo[playerid][pAge] = 11;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 2)
- {
- PlayerInfo[playerid][pAge] = 12;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 3)
- {
- PlayerInfo[playerid][pAge] = 13;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 4)
- {
- PlayerInfo[playerid][pAge] = 14;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 5)
- {
- PlayerInfo[playerid][pAge] = 15;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 6)
- {
- PlayerInfo[playerid][pAge] = 16;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 7)
- {
- PlayerInfo[playerid][pAge] = 17;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 8)
- {
- PlayerInfo[playerid][pAge] = 18;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 9)
- {
- PlayerInfo[playerid][pAge] = 19;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 10)
- {
- PlayerInfo[playerid][pAge] = 20;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 11)
- {
- PlayerInfo[playerid][pAge] = 21;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 12)
- {
- PlayerInfo[playerid][pAge] = 22;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 13)
- {
- PlayerInfo[playerid][pAge] = 23;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 14)
- {
- PlayerInfo[playerid][pAge] = 24;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 15)
- {
- PlayerInfo[playerid][pAge] = 25;
- ShowPlayerDialog(playerid, DRZAVA, DIALOG_STYLE_LIST, "{FFFFFF}Odakle ste?", "Los Santos\nSan Fierro\nLas Venturas", "Odaberi", "Odustani");
- RegistrationStep[playerid] = 3;
- }
- if(listitem == 16)
- {
- Kick(playerid);
- }
- }
- }
- if(dialogid == DRZAVA)
- {
- if(RegistrationStep[playerid] == 3)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pOrigin] = 1;
- ShowPlayerDialog(playerid, TUTORIAL, DIALOG_STYLE_MSGBOX, "{00FF00}Obavijest", "{FFFFFF}Uspjesno ste unjeli svoje podatke, \na sada slijedi Tutorial i pitanja.", "U redu", "Odustani");
- RegistrationStep[playerid] = 0;
- }
- if(listitem == 1)
- {
- PlayerInfo[playerid][pOrigin] = 2;
- ShowPlayerDialog(playerid, TUTORIAL, DIALOG_STYLE_MSGBOX, "{00FF00}Obavijest", "{FFFFFF}Uspjesno ste unjeli svoje podatke, \na sada slijedi Tutorial i pitanja.", "U redu", "Odustani");
- RegistrationStep[playerid] = 0;
- }
- if(listitem == 2)
- {
- PlayerInfo[playerid][pOrigin] = 3;
- ShowPlayerDialog(playerid, TUTORIAL, DIALOG_STYLE_MSGBOX, "{00FF00}Obavijest", "{FFFFFF}Uspjesno ste unjeli svoje podatke, \na sada slijedi Tutorial i pitanja.", "U redu", "Odustani");
- RegistrationStep[playerid] = 0;
- }
- if(listitem == 3)
- {
- Kick(playerid);
- }
- }
- }
- if(dialogid == TUTORIAL)
- {
- TutTime[playerid] = 1;
- }
- if(dialogid == PITANJE)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Tocno ste odgovorili na pitanje.");
- ShowPlayerDialog(playerid,PITANJE1,DIALOG_STYLE_LIST,"{0066FF}Sto je to PowerGaming (PG)? [Pitanje 2/6]","{FFFFFF}Voznja desnom stranom \nMjesanje OOC i IC \nPrisiljavanje osobe na ne zeljenu radnju","Odaberi","Odustani");
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- }
- if(dialogid == PITANJE1)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Tocno ste odgovorili na pitanje.");
- ShowPlayerDialog(playerid,PITANJE2,DIALOG_STYLE_LIST,"{0066FF}Sto cu napraviti ukoliko pronadjen bug? [Pitanje 3/6]","{FFFFFF}Reci drugima kako bi ga svi mogli iskoristavati \nPrijaviti na forumu i adminima na /report \nSutit cu o tome i iskoristavati ga","Odaberi","Odustani");
- }
- }
- if(dialogid == PITANJE2)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Tocno ste odgovorili na pitanje.");
- ShowPlayerDialog(playerid,PITANJE3,DIALOG_STYLE_LIST,"{0066FF}Sto je to DeathMatch (DM)? [Pitanje 4/6]","{FFFFFF}Ubijanje osobe bez dovoljno dobrog RolePlay razloga\nKradja vozila \nVoznja za zadnjem kotacu","Odaberi","Odustani");
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- }
- if(dialogid == PITANJE3)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Tocno ste odgovorili na pitanje.");
- ShowPlayerDialog(playerid,PITANJE4,DIALOG_STYLE_LIST,"{0066FF}Spawn Kill je...(SK)? [Pitanje 5/6]","{FFFFFF}Bjezanje policiji\nUbojstvo osobe na spawnu \nPenjanje po zgradama","Odaberi","Odustani");
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- }
- if(dialogid == PITANJE4)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Tocno ste odgovorili na pitanje.");
- ShowPlayerDialog(playerid,PITANJE5,DIALOG_STYLE_LIST,"{0066FF}Sto je to MetaGaming (MG)? [Pitanje 6/6]","{FFFFFF}Voznja helica\nUbojstvo policajca \nMjesanje OOC i IC informcija","Odaberi","Odustani");
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- }
- if(dialogid == PITANJE5)
- {
- if(listitem == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "Krvio ste odgovorili na pitanje, vracate se na Tutorial.");
- TutTime[playerid] = 1;
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid,KRAJ,DIALOG_STYLE_MSGBOX,"{00FF00}Cestitamo, tocno ste odgovorili na sva pitanja."," {FFFFFF}Sada slijedi prijavljivanje na server.\n\nUgodnu zabavu na serveru zeli Vam {FFCC33}NS Gaming Zajednica{FFFFFF}.","U redu","Odustani");
- }
- }
- if(dialogid == KRAJ)
- {
- new loginstring[200];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"{0000FF}%s\n\n{FFCC00}Korisnicki racun{FFFFFF}: Imate.\n\nMolimo vas da ispod upisite svoju {FF0000}lozinku {FFFFFF}kako bi ste se prijavili:",loginname);
- ShowPlayerDialog(playerid,PRIJAVA,DIALOG_STYLE_INPUT,"{00FF00}Prijava korisnickog imena ",loginstring,"Prijavi se","Odustani");
- }
- if(dialogid == PRIJAVA || dialogid == PRIJAVA1)
- {
- if(strlen(inputtext))
- {
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- //Encrypt(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- else
- {
- new loginstring[200];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"{0066FF}%s \n{FFCC33}Unjeli ste netocnu lozinku.\n{FFFFFF}Molimo {0066FF}ispod ponovno unesite vasu lozinku {FFFFFF}kako bi mogli igrati na serveru:",loginname);
- ShowPlayerDialog(playerid,PRIJAVA1,DIALOG_STYLE_INPUT,"{00FF00}Ponovna prijava korisnickog imena",loginstring,"Prijavi se","Odustani");
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
- }
- }
- }
- else
- {
- Kick(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement