[Pomoc] Dialog!

20. Nov. 2013. Zaključano
481
pregleda
7
postova
Adnan Lord
4
Made Man
20. Nov. 2013.
Skripta koju koristim: FilterSkripta
Detaljan opis problema: Zasto i kako da napravim kada igrac odabere odustani u dialogu da mu stamo skloni dialog, jer u ovoj FS , kada se odabere odustani igraca kickuje sa servera , zasto i sta da trazim ili da ubacim da to sredim!
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Adnan Lord
4
Made Man
20. Nov. 2013.
Nisam htio da sasjecem pa da lupam da se ti izgubis.. evo ti ovako pa probaj da mi pomognes i nemoj sve edit nego mi samo reci sta sa cime da zamjenim!! HVALA TI UNAPRIJED!
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
//--------------------------------------------------------------------------
//Obicni dialog koji se moze samo ugasiti
if(dialogid == closedialog) {
if(response || !response) return SetPVarInt(playerid, "dialog", 0);
//--------------------------------------------------------------------------
//Dialog za kupiti bizz, prodati ga, uci u njega, dignuti novac ili zakljucati
}else if(dialogid == bizzdialog) {
if(!response) return SetPVarInt(playerid, "dialog", 0);
//----------------------------------------------------------------------
#if !defined SIMPLE_BIZZS // Ukoliko nije definirano te koristimo bizzeve s interiorima
//----------------------------------------------------------------------
if(listitem == 0) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(bInfo == 1) { GameTextForPlayer(playerid, "~r~Zakljucano ~w~!", 2000, 6); SetPVarInt(playerid, "dialog", 0); return 1; }
        SetPlayerPos(playerid, bInfo, bInfo, bInfo); SetPlayerInterior(playerid, bInfo); SetPlayerVirtualWorld(playerid, bInfo); SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "enterbizz", 1); return 1; } }
}else if(listitem == 1) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#if defined CHECK_LEVEL
if(bInfo > GetPlayerScore(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno visok level da bi mogao kupiti ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#endif
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string),"Dali si siguran da zelis kupiti ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzkupidialog, DIALOG_STYLE_MSGBOX, stringa, string, "Kupi", "Odustani"); } }
    }else if(listitem == 2) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; SetPVarInt(playerid, "dialog", 1); format(string,sizeof(string),"Dali si siguran da zelis prodati ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzprodajdialog, DIALOG_STYLE_MSGBOX, stringa, string, "Prodaj", "Odustani"); } }
    }else if(listitem == 3) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); } }
        }else if(listitem == 4) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 0) { bInfo = 1; GameTextForPlayer(playerid, "~r~Zakljucano~w~ !", 1000, 6); SetPVarInt(playerid, "dialog", 0); SaveBizz(i);
}else if(bInfo == 1) { bInfo = 0; GameTextForPlayer(playerid, "~g~Otkljucano~w~ !", 1000, 6); SetPVarInt(playerid, "dialog", 0); SaveBizz(i); return 1; } } } }
//----------------------------------------------------------------------
#else // Ukoliko koristimo bizzeve bez interiora
//----------------------------------------------------------------------
  if(listitem == 0) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#if defined CHECK_LEVEL
if(bInfo > GetPlayerScore(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno visok level da bi mogao kupiti ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#endif
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string),"Dali si siguran da zelis kupiti ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzkupidialog, DIALOG_STYLE_MSGBOX, stringa, string, "Kupi", "Odustani"); } }
    }else if(listitem == 1) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; SetPVarInt(playerid, "dialog", 1); format(string,sizeof(string),"Dali si siguran da zelis prodati ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzprodajdialog, DIALOG_STYLE_MSGBOX, stringa, string, "Prodaj", "Odustani"); } }
    }else if(listitem == 2) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); } } }
//----------------------------------------------------------------------
#endif
//----------------------------------------------------------------------
//--------------------------------------------------------------------------
//Dialog za odluciti dali izaci iz bizza
}else if(dialogid == bizzizlazakdialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo) && GetPlayerVirtualWorld(playerid) == bInfo) { SetPlayerPos(playerid, bInfo, bInfo, bInfo); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "enterbizz", 1); PlayerPlaySound(playerid, 1149, 0, 0, 0); return 1; } }
//--------------------------------------------------------------------------
//Dialog za odluciti dali kupiti bizz
}else if(dialogid == bizzkupidialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
  if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string; SetPVarInt(playerid, "bizz", i); bInfo = 1; strmid(bInfo, pName(playerid), 0, strlen(pName(playerid)), 255); GIVE_MONEY_COMMAND(playerid, -bInfo); SaveBizz(i);
format(string,sizeof(string),"Cestitamo na vasoj kupovini !\n\n%s\nCijena: %d $\nZarada: %d $\nNovac: %d $",bInfo, bInfo, bInfo, bInfo); ShowPlayerDialog(playerid, closedialog, DIALOG_STYLE_MSGBOX, "Cestitamo !", string, "Zatvori", ""); } }
//--------------------------------------------------------------------------
//Dialog za odluciti dali prodati bizz
}else if(dialogid == bizzprodajdialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "bizz", -1); bInfo = 0; bInfo = 0; strmid(bInfo, "Na_Prodaju", 0, strlen("Na_Prodaju"), 255); GIVE_MONEY_COMMAND(playerid, bInfo);
new string; format(string,sizeof(string),"* BIZZ{FFFFFF}: Prodao si bizz, natrag si dobio %d $", bInfo); SendClientMessage(playerid, bizzboja1, string); SaveBizz(i); } }
//--------------------------------------------------------------------------
//Dialog za upisati koliko novaca zelis podignuti iz bizza
}else if(dialogid == bizznovacdialog) {
    if(!response || !inputtext) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa, novac = strval(inputtext);
if(novac < 1) { format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemozes ne podignuti nista iz ovog bizza !"); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); return 1; }
if(novac > bInfo) { SetPVarInt(playerid, "dialog", 0); format(string,sizeof(string), "Upisi koliko novaca zelis podignuti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas toliko novaca u bizzu !"); return 1; }
GIVE_MONEY_COMMAND(playerid, novac); bInfo-=novac; format(string,sizeof(string),"Podignuo si: %d $\nStanje bizza: %d",novac,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, closedialog, DIALOG_STYLE_MSGBOX, stringa, string, " ", "Zatvori"); SaveBizz(i); } }
//--------------------------------------------------------------------------
    return 1; }
return 0; }
MadDog
5
Crime Lord
20. Nov. 2013.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
//--------------------------------------------------------------------------
//Obicni dialog koji se moze samo ugasiti
if(dialogid == closedialog) {
if(response || !response) return SetPVarInt(playerid, "dialog", 0);
//--------------------------------------------------------------------------
//Dialog za kupiti bizz, prodati ga, uci u njega, dignuti novac ili zakljucati
}else if(dialogid == bizzdialog) {
if(!response) return SetPVarInt(playerid, "dialog", 0);
//----------------------------------------------------------------------
#if !defined SIMPLE_BIZZS // Ukoliko nije definirano te koristimo bizzeve s interiorima
//----------------------------------------------------------------------
if(listitem == 0) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(bInfo == 1) { GameTextForPlayer(playerid, "~r~Zakljucano ~w~!", 2000, 6); SetPVarInt(playerid, "dialog", 0); return 1; }
        SetPlayerPos(playerid, bInfo, bInfo, bInfo); SetPlayerInterior(playerid, bInfo); SetPlayerVirtualWorld(playerid, bInfo); SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "enterbizz", 1); return 1; } }
}else if(listitem == 1) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#if defined CHECK_LEVEL
if(bInfo > GetPlayerScore(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno visok level da bi mogao kupiti ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#endif
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string),"Dali si siguran da zelis kupiti ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzkupidialog, DIALOG_STYLE_MSGBOX, stringa, string, "Kupi", "Odustani"); } }
    }else if(listitem == 2) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; SetPVarInt(playerid, "dialog", 1); format(string,sizeof(string),"Dali si siguran da zelis prodati ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzprodajdialog, DIALOG_STYLE_MSGBOX, stringa, string, "Prodaj", "Odustani"); } }
    }else if(listitem == 3) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); } }
        }else if(listitem == 4) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 0) { bInfo = 1; GameTextForPlayer(playerid, "~r~Zakljucano~w~ !", 1000, 6); SetPVarInt(playerid, "dialog", 0); SaveBizz(i);
}else if(bInfo == 1) { bInfo = 0; GameTextForPlayer(playerid, "~g~Otkljucano~w~ !", 1000, 6); SetPVarInt(playerid, "dialog", 0); SaveBizz(i); return 1; } } } }
//----------------------------------------------------------------------
#else // Ukoliko koristimo bizzeve bez interiora
//----------------------------------------------------------------------
  if(listitem == 0) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#if defined CHECK_LEVEL
if(bInfo > GetPlayerScore(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno visok level da bi mogao kupiti ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
#endif
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string),"Dali si siguran da zelis kupiti ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzkupidialog, DIALOG_STYLE_MSGBOX, stringa, string, "Kupi", "Odustani"); } }
    }else if(listitem == 1) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; SetPVarInt(playerid, "dialog", 1); format(string,sizeof(string),"Dali si siguran da zelis prodati ovaj bizz ?\n\nCijena: %d $\nZarada: %d $\nLevel: %d",bInfo,bInfo,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, bizzprodajdialog, DIALOG_STYLE_MSGBOX, stringa, string, "Prodaj", "Odustani"); } }
    }else if(listitem == 2) {
    for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa; format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); } } }
//----------------------------------------------------------------------
#endif
//----------------------------------------------------------------------
//--------------------------------------------------------------------------
//Dialog za odluciti dali izaci iz bizza
}else if(dialogid == bizzizlazakdialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
for(new i=0;i     if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo) && GetPlayerVirtualWorld(playerid) == bInfo) { SetPlayerPos(playerid, bInfo, bInfo, bInfo); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "enterbizz", 1); PlayerPlaySound(playerid, 1149, 0, 0, 0); return 1; } }
//--------------------------------------------------------------------------
//Dialog za odluciti dali kupiti bizz
}else if(dialogid == bizzkupidialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != -1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Vec si vlasnik jednog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
  if(bInfo == 1) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Ovaj bizz ima vlasnika !"); SetPVarInt(playerid, "dialog", 0); return 1; }
if(bInfo > GetPlayerMoney(playerid)) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas dovoljno novaca kako bi kupio ovaj bizz !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string; SetPVarInt(playerid, "bizz", i); bInfo = 1; strmid(bInfo, pName(playerid), 0, strlen(pName(playerid)), 255); GIVE_MONEY_COMMAND(playerid, -bInfo); SaveBizz(i);
format(string,sizeof(string),"Cestitamo na vasoj kupovini !\n\n%s\nCijena: %d $\nZarada: %d $\nNovac: %d $",bInfo, bInfo, bInfo, bInfo); ShowPlayerDialog(playerid, closedialog, DIALOG_STYLE_MSGBOX, "Cestitamo !", string, "Zatvori", ""); } }
//--------------------------------------------------------------------------
//Dialog za odluciti dali prodati bizz
}else if(dialogid == bizzprodajdialog) {
    if(!response) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
SetPVarInt(playerid, "dialog", 0); SetPVarInt(playerid, "bizz", -1); bInfo = 0; bInfo = 0; strmid(bInfo, "Na_Prodaju", 0, strlen("Na_Prodaju"), 255); GIVE_MONEY_COMMAND(playerid, bInfo);
new string; format(string,sizeof(string),"* BIZZ{FFFFFF}: Prodao si bizz, natrag si dobio %d $", bInfo); SendClientMessage(playerid, bizzboja1, string); SaveBizz(i); } }
//--------------------------------------------------------------------------
//Dialog za upisati koliko novaca zelis podignuti iz bizza
}else if(dialogid == bizznovacdialog) {
    if(!response || !inputtext) return SetPVarInt(playerid, "dialog", 0);
        for(new i=0;i if(PlayerToPoint(5.0, playerid, bInfo, bInfo, bInfo)) {
            if(GetPVarInt(playerid, "bizz") != i) { SendClientMessage(playerid, crvena, "* BIZZ{FFFFFFF}: Nisi vlasnik ovog bizza !"); SetPVarInt(playerid, "dialog", 0); return 1; }
new string, stringa, novac = strval(inputtext);
if(novac < 1) { format(string,sizeof(string), "Upisi koliko novaca zelis podignti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemozes ne podignuti nista iz ovog bizza !"); ShowPlayerDialog(playerid, bizznovacdialog, DIALOG_STYLE_INPUT, stringa, string, "Podigni", "Odustani"); return 1; }
if(novac > bInfo) { SetPVarInt(playerid, "dialog", 0); format(string,sizeof(string), "Upisi koliko novaca zelis podignuti !\nMAX: %d $", bInfo); format(stringa, sizeof(stringa), "%s", bInfo); SendClientMessage(playerid, crvena, "* BIZZ{FFFFFF}: Nemas toliko novaca u bizzu !"); return 1; }
GIVE_MONEY_COMMAND(playerid, novac); bInfo-=novac; format(string,sizeof(string),"Podignuo si: %d $\nStanje bizza: %d",novac,bInfo); format(stringa,sizeof(stringa),"%s",bInfo); ShowPlayerDialog(playerid, closedialog, DIALOG_STYLE_MSGBOX, stringa, string, " ", "Zatvori"); SaveBizz(i); } }
//--------------------------------------------------------------------------
    return 1; }
}


probaj tako...
Adnan Lord
4
Made Man
20. Nov. 2013.
Opet kikuje. Kada se odabere odustani.
public OnPlayerPickUpPickup(playerid, pickupid) {
//--------------------------------------------------------------------------
#if !defined SIMPLE_BIZZS // Ukoliko koristimo bizzeve s interiorom
//-------------------------------------------------------------------------
for(new i=0;i if(pickupid == bInfo) { // Ako je igrac pokupio pickup od nekog bizza izvana
if(GetPVarInt(playerid, "enterbizz") == 1) return SetPVarInt(playerid, "enterbizz", 0);
if(GetPVarInt(playerid, "dialog") == 0) { SetPVarInt(playerid, "dialog", 1); PlayerPlaySound(playerid, 1149, 0, 0, 0); ShowPlayerDialog(playerid, bizzdialog, DIALOG_STYLE_LIST, "Bizz", "Ulazak\nKupi bizz\nProdaj bizz\nPodigni novac\nOtkljucaj/Zakljucaj", "Izaberi", "Odustani"); return 1; }
}else if(pickupid == bInfo) { // Ako je igrac pokupio pockup od nekog bizza iznutra
if(GetPVarInt(playerid, "enterbizz") == 1) return SetPVarInt(playerid, "enterbizz", 0);
if(GetPVarInt(playerid, "dialog") == 0) { SetPVarInt(playerid, "dialog", 1); PlayerPlaySound(playerid, 1149, 0, 0, 0); ShowPlayerDialog(playerid, bizzizlazakdialog, DIALOG_STYLE_MSGBOX, "Bizz", "Dali zelis izaci iz bizza ?", "Izadi", "Odustani"); return 1; } } }
//--------------------------------------------------------------------------
#else // Ukoliko nekoristimo bizzve s interiorom, tj koristimo simple bizzeve
//--------------------------------------------------------------------------
for(new i=0;i if(pickupid == bInfo) { // Ako je igrac pokupio pickup od nekog bizza izvana
        if(GetPVarInt(playerid, "dialog") == 0) { SetPVarInt(playerid, "dialog", 1); PlayerPlaySound(playerid, 1149, 0, 0, 0); ShowPlayerDialog(playerid, bizzdialog, DIALOG_STYLE_LIST, "Bizz", "Kupi bizz\nProdaj bizz\nPodigni novac", "Izaberi", "Odustani"); return 1; } } }
//--------------------------------------------------------------------------
#endif
//--------------------------------------------------------------------------
return 1; }


Mozda ovo pomogne sta? ili ne?
MadDog
5
Crime Lord
20. Nov. 2013.
mozda ti se brkaju dijalozi ne znam do cega ovo moze biti, prvi put gledam takav problem bez igde kick funkcije.
Adnan Lord
4
Made Man
20. Nov. 2013.
I meni je ovo bas glu*o ima par dialoga kod kojih kada odaberes zatvori zatvori, ali ovi kikuju sa servera tj.

Server Close Connection 😄

De molim vas ako bilo tko zna neka pomogne
Adnan Lord
4
Made Man
21. Nov. 2013.
Nista ovo, pokusati cu da napravim da se mora komanda kucati i ukinuti kickovanje.

LOCK Napravio sam !

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha