Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================ >OnDialogResponse
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- /*case DIALOG_REGISTER:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- PlayerData[playerid][Ulogovan] = 0;
- if(!strlen(inputtext)) return SPD(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""svetloplava"Registracija:",""plava"Nevazeca sifra,upisite novu!","Potvrdi","X");
- PlayerData[playerid][Lozinka] = udb_hash(inputtext);
- ShowPlayerDialog(playerid, DIALOG_POL, DIALOG_STYLE_LIST,""svetloplava"Registracija:"""plava" Molimo vas da izaberete vas pol:","Musko \n Zensko","Potvrdi","X");
- }
- }
- case DIALOG_LOGIN:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- new txt[30];
- PlayerData[playerid][Ulogovan] = 0;
- if(udb_hash(inputtext) == PlayerData[playerid][Lozinka])
- {
- INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
- SpawnPlayer(playerid);
- GivePlayerMoney(playerid, PlayerData[playerid][Cash]);
- SetPlayerScore(playerid,PlayerData[playerid][Level]);
- TogglePlayerSpectating(playerid, false);
- PlayerData[playerid][Ulogovan] = 1;
- SetSpawnInfo( playerid, 0, PlayerData[playerid][Skin], PlayerData[playerid][x],PlayerData[playerid][y],PlayerData[playerid][z],PlayerData[playerid][a], 0, 0, 0, 0, 0, 0 );
- SpawnPlayer(playerid);
- if(PlayerData[playerid][JailVreme] >= 1)
- {
- new str[48];
- SetTimerEx("JailGotov", PlayerData[playerid][JailVreme]*60000, false, "i", playerid);
- SetPlayerPos(playerid, 2543.462646,-1308.379882,1026.728393);
- SetPlayerInterior(playerid, 2);
- SetPlayerVirtualWorld(playerid, 1);
- format(str,sizeof(str),"~y~Jailan jos ~r~%d",PlayerData[playerid][JailVreme]);
- GameTextForPlayer(playerid,str,3000,3);
- }
- for(new i; i < 20; i++)
- {
- SendClientMessage(playerid, -1," ");
- }
- GetPlayerName(playerid, pName,sizeof(pName));
- format(txt,sizeof(txt),""zelena"%s",pName);
- SCM(playerid, ZUTA,txt);
- SCM(playerid, ZUTA,"Dobrodosao nazad na server,Zelimo ti ugodnu igru!");
- }
- else
- {
- SPD(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,""svetloplava"Login:",""crvena"Upisali ste pogresnu lozinku!","Potvrdi","X");
- }
- }
- }
- case DIALOG_POL:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- PlayerData[playerid][Pol] = 0;
- SCM(playerid, ZELENA,"Ok, vi ste musko");
- }
- if(listitem == 1)
- {
- PlayerData[playerid][Pol] = 1;
- SCM(playerid, ZELENA,"Ok, vi ste zensko");
- }
- SPD(playerid, DIALOG_GODINE, DIALOG_STYLE_INPUT,""svetloplava"Registracija:",""plava"Upisite vase godine:","Potvrdi","X");
- }
- }
- case DIALOG_GODINE:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- new godine = strval(inputtext);
- new txt[24];
- if(godine < 7) return SPD(playerid, DIALOG_GODINE, DIALOG_STYLE_INPUT,""svetloplava"Registracija:",""crvena"Vase godine nemogu biti manje od 7","Potvrdi","X");
- if(godine > MAX_GOD) return SPD(playerid, DIALOG_GODINE, DIALOG_STYLE_INPUT,""svetloplava"Registracija:",""crvena"Vase godine nemogu biti vece od 65","Potvrdi","X");
- PlayerData[playerid][Godine] = godine;
- format(txt,sizeof(txt),"Ok,Idemo na dialog drzavljanstva!");
- SCM(playerid, ZELENA,txt);
- SPD(playerid, DIALOG_DRZAVLJANSTVO, DIALOG_STYLE_LIST,""svetloplava"Registracija - "plava"Izaberite vase drzavljanstvo","Srbija \n Hrvatska \n Bosna i Herzegovina \n Crna Gora \n Makedonija \n Slovenija \n Ostalo","Potvrdi","X");
- }
- }
- case DIALOG_DRZAVLJANSTVO:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(listitem == 0)
- {
- PlayerData[playerid][Drzavljanstvo] = 0; //SRB
- SCM(playerid, ZELENA,"Ok,Iz Srbije ste");
- }
- if(listitem == 1)
- {
- PlayerData[playerid][Drzavljanstvo] = 1; //HR
- SCM(playerid, ZELENA,"Ok,Iz Hrvatske ste");
- }
- if(listitem == 2)
- {
- PlayerData[playerid][Drzavljanstvo] = 2; //BIH
- SCM(playerid, ZELENA,"Ok,Iz BIH ste");
- }
- if(listitem == 3)
- {
- PlayerData[playerid][Drzavljanstvo] = 3; //CG
- SCM(playerid, ZELENA,"Ok,Iz Crne Gore ste");
- }
- if(listitem == 4)
- {
- PlayerData[playerid][Drzavljanstvo] = 4; //MK
- SCM(playerid, ZELENA,"Ok,Iz Makedonije ste");
- }
- if(listitem == 5)
- {
- PlayerData[playerid][Drzavljanstvo] = 5; //SLO
- SCM(playerid, ZELENA,"Ok,Iz Slovenije ste");
- }
- if(listitem == 6)
- {
- PlayerData[playerid][Drzavljanstvo] = 6; //OST
- }
- if(PlayerData[playerid][Pol] == 0) { PlayerData[playerid][Skin] = 22; }
- if(PlayerData[playerid][Pol] == 1) { PlayerData[playerid][Skin] = 56; }
- SPD(playerid, DIALOG_DOBRODOSLICA, DIALOG_STYLE_MSGBOX,""svetloplava"Registracija - Uspesna",""bela"Uzivajte igrajuci na serveru zeli vam \n "zelena" FH:RP STAFF TEAM!","Nastavi","");
- SetSpawnInfo( playerid, 0, PlayerData[playerid][Skin], 2351.3213,-36.1563,26.4844,56.5654, 0, 0, 0, 0, 0, 0 );
- SpawnPlayer(playerid);
- for(new i; i < 20; i++)
- {
- SendClientMessage(playerid, -1," ");
- }
- SCM(playerid, ZUTA,"Ukoliko primetite Citera(Hakera/Igraca koji vara) koristite /report ili /prijavi");
- SCM(playerid, ZUTA,"Ukoliko ste novi i potrebna vam je pomoc ukucajte /novi");
- SCM(playerid, ZUTA,"Ukoliko zelite da postavite pitanje ukucajte /pitaj");
- SCM(playerid, ZUTA,"Za pocetak dobijate 350$,sto ce vam biti dovoljno");
- GivePlayerMoney(playerid, 350);
- PlayerData[playerid][Ulogovan] = 1;
- return 1;
- }
- }
- case DIALOG_DOBRODOSLICA:
- {
- if(response)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Sifra",PlayerData[playerid][Lozinka]);
- INI_WriteInt(File,"Novac",0);
- INI_WriteInt(File,"Skin",0);
- INI_WriteInt(File,"Level",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Asistent",0);
- INI_WriteInt(File,"Promoter",0);
- INI_WriteInt(File,"VIP",0);
- INI_WriteInt(File,"ORG",-1);
- INI_WriteInt(File,"Rank",-1);
- INI_WriteInt(File,"Banovan",0);
- INI_WriteInt(File,"Banka novac",0);
- INI_WriteFloat(File,"x",0);
- INI_WriteFloat(File,"y",0);
- INI_WriteFloat(File,"z",0);
- INI_WriteFloat(File,"a",0);
- INI_WriteInt(File,"INT",0);
- INI_WriteInt(File,"VW",0);
- INI_WriteInt(File,"JailVreme",-1);
- INI_Close(File);
- TogglePlayerSpectating(playerid, false);
- PlayerData[playerid][REG] = 0;
- }
- }*/
- case DIALOG_PORT:
- {
- if(response)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- switch(listitem)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vozilo = GetPlayerVehicleID(playerid);
- if(listitem == 0) { SetPlayerPos(playerid, 2276.7539,-85.2362,26.4977) && SCM(playerid, BELA,"Portao si se do Policije") && SetVehiclePos(vozilo, 2276.7539,-85.2362,26.4977) && PutPlayerInVehicle(playerid, vozilo, 0); }
- if(listitem == 1) { SetPlayerPos(playerid, 2390.0713,92.7207,26.3359) && SCM(playerid, BELA,"Portao si se do Banke") && SetVehiclePos(vozilo, 2390.0713,92.7207,26.3359) && PutPlayerInVehicle(playerid, vozilo, 0); }
- if(listitem == 2) { SetPlayerPos(playerid, 2338.6211,60.6317,26.4844) && SCM(playerid, BELA,"Portao si se do Gun-Shopa") && SetVehiclePos(vozilo, 2338.6211,60.6317,26.4844) && PutPlayerInVehicle(playerid, vozilo, 0); }
- if(listitem == 3) { SetPlayerPos(playerid, 1380.0525,202.4533,19.5547) && SCM(playerid, BELA,"Portao si se do MontGomery-a") && SetVehiclePos(vozilo, 1380.0525,202.4533,19.5547) && PutPlayerInVehicle(playerid, vozilo, 0); }
- }
- else
- {
- if(listitem == 0) { SetPlayerPos(playerid, 2276.7539,-85.2362,26.4977) && SCM(playerid, BELA,"Portao si se do Policije"); }
- if(listitem == 0) { SetPlayerPos(playerid, 2390.0713,92.7207,26.3359) && SCM(playerid, BELA,"Portao si se do Banke"); }
- if(listitem == 0) { SetPlayerPos(playerid, 2338.6211,60.6317,26.4844) && SCM(playerid, BELA,"Portao si se do Gun-Shopa"); }
- if(listitem == 0) { SetPlayerPos(playerid, 1380.0525,202.4533,19.5547) && SCM(playerid, BELA,"Portao si se do MontGomery-a"); }
- }
- return 1;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment