[pomoc] Dialog

Započeo .G.h.0.s.T., Februar 10, 2011, 21:45:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: godfather
Detaljan opis problema: zanima me dali se moze u dialogu namjestiti da kada pritisnem "odustani" da mi otvori dialog onaj prije koje je bio?? hvala
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

ako kliknes ok

if(response)
{
//basmo stavi nesto npr sentclientmesseg
}

ako kliknes odustani
       
if(!response)
{
//vamo stavi showplayerdialog i samo dialog koji zelis npr
}
Poslednja Izmena: Februar 10, 2011, 22:18:20 POSLE PODNE od [HG] Ante_Dracar aka Lopa



Posjetite nas i osjetite razliku
www.balkan-city.info



193.192.59.151:7788


Game monitor nije u 100% tocan tj uvjek pokaziva manje

Daj nam dialog i onaj dialog koji bi se trebao pojaviti kad se klikne odustani

evo ovako.

Komanda:
if(strcmp(cmd, "/port", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] >= 3)
    {
        ShowPlayerDialog(playerid,PORT,DIALOG_STYLE_LIST ,"Lista Teleporta","Burg\nKolodvor\nVijecnica\nAerodrom\nOrganizacije\nEventi","Odaberi","Odustani");
}
else {SendClientMessage(playerid,COLOR_GRAD1,"Nemate ovlasti koristiti to!");}
}
}


OnDialogResponse:                      (pod listitem 3,4,5 se nalazi ShowPlayerDialog)

if(dialogid == PORT)
{
if(response)
{
if(listitem == 0) //BURG
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1205.1162,-930.1832,42.5556);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1210.6946,-919.3347,43.0342);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 1) //KOLODVOR
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1742.6729,-1858.3868,13.1411);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1743.3036,-1861.4408,13.5775);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 2) //VIJECNICA
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1493.2124,-1727.1216,13.1915);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1490.1742,-1723.8678,13.5469);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 3) //AERODROM
{
                ShowPlayerDialog(playerid, PORT1, DIALOG_STYLE_LIST, "Lista Aerodroma","Los Santos International\nEaster Bay Airport\nLas Venturas Airport", "Odaberi", "Odustani");
}
if(listitem == 4) //ORGANIZACIJE
{
                ShowPlayerDialog(playerid, PORT2, DIALOG_STYLE_LIST, "Lista Organizacija","Policija\nFBI\nVojska\nBolnica\nBlack Hands Triads\nGrove Street Crime Family", "Odaberi", "Odustani");
}
if(listitem == 5) //EVENTI
{
                ShowPlayerDialog(playerid, PORT3, DIALOG_STYLE_LIST, "Lista Evenata","402 Street Race\nTour BF", "Odaberi", "Odustani");
}
}
return 1;
}
if(dialogid == PORT1)
{
if(response)
{
if(listitem == 0) //LS Aero
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1964.9974,-2180.1655,13.2740);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1953.9380,-2174.9236,13.5469);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 1) //SF Aero
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1417.0,-295.8,14.1);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1417.0,-295.8,14.1);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 2) //LV Aero
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1699.2, 1435.1, 10.7);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
}
return 1;
}
if(dialogid == PORT2)
{
if(response)
{
if(listitem == 0) //Policija
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1523.8054,-1681.3856,13.1890);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1523.8054,-1681.3856,13.1890);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 1) //FBI
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 862.1283,-1025.2849,28.5232);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 862.1283,-1025.2849,28.5232);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 2) //SWAT
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2706.4771,-2410.3140,13.2709);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2706.8604,-2414.0864,13.6328);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 3) //Bolnica
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1189.9741,-1328.1215,13.2052);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1185.7860,-1327.3721,13.5599);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 4) //BHT
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 792.0359,-1156.3651,23.3870);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 789.5631,-1153.6144,23.6639);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 5) //GSCF
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2486.8713,-1666.0513,13.0706);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2465.9961,-1670.6708,13.4786);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
}
return 1;
}
if(dialogid == PORT3)
{
if(response)
{
if(listitem == 0) //402 Street Race
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2059.3562,-2557.5913,13.2528);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2059.3562,-2557.5913,13.2528);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 1) //Tour
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2849.6711,-1891.1873,10.9245);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2849.6711,-1891.1873,10.9245);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
}
return 1;
}


i sada kad recimo odaberem "organizacije  (PORT2)" pa se zelim vratiti na prijasnji dialog i pritisnem tipku "odustani" trebao bi se onda pokazati dialog onaj prvi (PORT).

Hvala

if(dialogid == PORT2)
{
if(response)
{
if(listitem == 0) //Policija
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1523.8054,-1681.3856,13.1890);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1523.8054,-1681.3856,13.1890);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 1) //FBI
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 862.1283,-1025.2849,28.5232);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 862.1283,-1025.2849,28.5232);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 2) //SWAT
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2706.4771,-2410.3140,13.2709);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2706.8604,-2414.0864,13.6328);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 3) //Bolnica
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1189.9741,-1328.1215,13.2052);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1185.7860,-1327.3721,13.5599);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 4) //BHT
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 792.0359,-1156.3651,23.3870);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 789.5631,-1153.6144,23.6639);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
if(listitem == 5) //GSCF
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2486.8713,-1666.0513,13.0706);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2465.9961,-1670.6708,13.4786);
}
SendClientMessage(playerid, COLOR_GRAD1, "   Teleportirani ste!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
} else return ShowPlayerDialog(playerid,PORT,DIALOG_STYLE_LIST,"naslov","sadrzaj","ok","odustani");

}


Eto, ja sam ti dao primjer za taj "port2", sad da vidimo dali ces skontati, ako budes imao problema samo javi
Poslednja Izmena: Februar 10, 2011, 22:24:46 POSLE PODNE od [Saw]BlόόdMaster

Ok [Saw]BlόόdMaster. Puno Hvala.

EDIT:  Zanima me jos dali se moze napraviti vlastiti interior i kako??

Hvala
Poslednja Izmena: Februar 10, 2011, 22:46:06 POSLE PODNE od [BF]Michael


Citat: [BF]Michael poslato Februar 10, 2011, 22:34:07 POSLE PODNE
Zanima me jos dali se moze napraviti vlastiti interior i kako??

Pa kad napravis mapu negdje u zraku, samo kad konvertaš promjenis interior world (;

Citat: [Saw]BlόόdMaster poslato Februar 11, 2011, 09:44:30 PRE PODNE
Citat: [BF]Michael poslato Februar 10, 2011, 22:34:07 POSLE PODNE
Zanima me jos dali se moze napraviti vlastiti interior i kako??

Pa kad napravis mapu negdje u zraku, samo kad konvertaš promjenis interior world (;

Nema interior ID-a??

Citat: [BF]Michael poslato Februar 11, 2011, 09:47:59 PRE PODNE
Citat: [Saw]BlόόdMaster poslato Februar 11, 2011, 09:44:30 PRE PODNE
Citat: [BF]Michael poslato Februar 10, 2011, 22:34:07 POSLE PODNE
Zanima me jos dali se moze napraviti vlastiti interior i kako??

Pa kad napravis mapu negdje u zraku, samo kad konvertaš promjenis interior world (;

Nema interior ID-a??

Moras imat neki konverter koji podrzava interior ID... Evo moj:
http://i51.tinypic.com/1zx42ac.jpg

Citat: [Saw]BlόόdMaster poslato Februar 11, 2011, 10:00:48 PRE PODNE

Moras imat neki konverter koji podrzava interior ID... Evo moj:
http://i51.tinypic.com/1zx42ac.jpg

OK. tnx.

znaci bas u zraku slozim nest od objekata i onda pretvorim u int?? ok