Detaljan opis problema:Nece da mi radi dialog kada kliknem nista ...?
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
evo cmd
CMD:kupioruzje(playerid, params[])
{
//new x;
for(new i; i < sizeof(BizzInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid,25.0,BizzInfo, BizzInfo, BizzInfo) && GetPlayerVirtualWorld(playerid) == BizzInfo)
{
if(BizzInfo == 1)
{
ShowPlayerDialog(playerid, 33331, DIALOG_STYLE_LIST, "{00c0ff}Oruzje,odaberi s liste", "Noz($40)\nPadobran($50)\nPistolj 9mm($80)\nPistolj 9mm tihi($100)\nDesert Eagle($150)\nSMG-MP5($250)\nAK47($400)\nM4($420)\nSniper Rifle($700)", "Kupi", "Odustani");
break;
}
}
}
return 1;
}evo dialog
if(dialogid == 33331) // Oruzje
{
new cash;
cash = GetPlayerCash(playerid);
if(response)
{
if(BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] <= 0) return GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
if(PlayerInfo == 0) return SCM(playerid,-1, "Greska | Nemate dozvolu za oruzije!");
if(listitem == 0)
{
if(cash <= 39)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 4, 500); // Noz
DajPare(playerid, -40);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 40;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 40);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 1)
{
if(cash <= 49)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 46, 500); // padobran
DajPare(playerid, -50);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 50;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 50);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 2)
{
if(cash <= 79)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 22, 500); // 9mm
DajPare(playerid, -80);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 80;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 80);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 3)
{
if(cash <= 99)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 23, 500); // Priguseni 9mm
DajPare(playerid, -100);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 100;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 100);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 4)
{
if(cash <= 149)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 24, 500); //Desert Eagle
DajPare(playerid, -150);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 150;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 150);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 5)
{
if(cash <= 249)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 29, 500); //MP5
DajPare(playerid, -250);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 250;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 250);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 6)
{
if(cash <= 399)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 30, 500); //AK-47
DajPare(playerid, -400);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 400;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 400);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 7)
{
if(cash <= 419)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 31, 500); //M4
DajPare(playerid, -420);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 420;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 420);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
if(listitem == 8)
{
if(cash <= 449)
{
SendClientMessage(playerid, COLOR_GRESKA, "{00C0FF}Greska {C3C3C3}| Nemate dovoljno novca.");
return 1;
}
PostaviOru(playerid, 34, 500); //Sniper
DajPare(playerid, -700);
if(GetPVarInt(playerid, "PlayerInBizz") != 999)
{
BizzInfo[GetPVarInt(playerid, "PlayerInBizz")] += 700;
ExtortionBiz(GetPVarInt(playerid, "PlayerInBizz"), 700);
SaveBizz(GetPVarInt(playerid, "PlayerInBizz"));
}
SendClientMessage(playerid, COLOR_GRAD2, "Zahvaljujemo na kupnji.Dodjite nam opet...");
}
}
return 1;
}