Hallo zusammen habe folgendes problem ich habe einen gunshop erstellt
der sieht so aus
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST , "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
if(dialogid == Waffenmenu)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid)>=500) // Desert Eagle
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-500);
GameTextForPlayer(playerid, "~r~Desert Eagle ~w~gekauft(500$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 1) // Shotgun
{
if(GetPlayerMoney(playerid)>=600)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
GivePlayerWeapon(playerid,25,40);
GivePlayerMoney(playerid, -600);
GameTextForPlayer(playerid, "~r~Shotgun ~w~gekauft(600$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 2) // MP5
{
if(GetPlayerMoney(playerid)>=800)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
GivePlayerWeapon(playerid,29,150);
GivePlayerMoney(playerid, -800);
GameTextForPlayer(playerid, "~r~MP5 ~w~gekauft(800$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 3) // AK47
{
if(GetPlayerMoney(playerid)>=1200)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
GivePlayerWeapon(playerid,30,200);
GivePlayerMoney(playerid, -1200);
GameTextForPlayer(playerid, "~r~AK47 ~w~gekauft(1200$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 4) // M4
{
if(GetPlayerMoney(playerid)>=1200)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
GivePlayerWeapon(playerid,31,200);
GivePlayerMoney(playerid, -1200);
GameTextForPlayer(playerid, "~r~M4 ~w~gekauft(1200$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 5) // Armor
{
if(GetPlayerMoney(playerid)>=2000)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, -1200);
GameTextForPlayer(playerid, "~r~Armor ~w~gekauft(2000$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
if(listitem == 6) // Heal
{
if(GetPlayerMoney(playerid)>=300)
{
/*if(SBizzInfo[14][sbProducts] <= 0)
{
GameTextForUser(playerid, "~r~Nicht lieferbar","~r~out of stock", 5000, 1);
ShowPlayerDialog(playerid, Waffenmenu, DIALOG_STYLE_LIST, "Waffen", "DesertEagle = 500$\nShotgun = 600$\nMP5 = 800$\nAk47 = 1200$\nM4 = 1200$\nArmor = 2000\nHeal = 300$", "Kaufen", "Abbrechen");
return 1;
}*/
//BizzInfo[14][sbProducts] -= 2;
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -300);
GameTextForPlayer(playerid, "~r~Heal ~w~gekauft(300$)", 1000, 1);
}
else
{
SendClientMessage(playerid,0x9b7100ff,"Du hast nicht genug Geld für diese Waffe!!!");
}
return 1;
}
}
}
So jetzt wollte ich einen neuen diolog fertig machen
(denn habe ich einfach herangehängt unten bei OnDialogResponse)
ShowPlayerDialog(playerid, fahrstuhl, DIALOG_STYLE_LIST , "Fahrstuhl", "Erdgeschoss\nEtage 1\nEtage 2", "Drücken", "Abbrechen");
if(dialogid == fahrstuhl)
{
if(response)
{
if(listitem == 1)
{
GameTextForPlayer(playerid, "~r~Erdgeschoss", 5000, 1);
SetPlayerPos(playerid,1099.0370,-825.4524,86.9453);
SetPlayerFacingAngle(playerid, 90.00);
}
if(listitem == 2)
{
GameTextForPlayer(playerid, "~r~Etage 1", 5000, 1);
SetPlayerPos(playerid,1093.9283,-805.7560,111.9145);
SetPlayerFacingAngle(playerid, 90.00);
}
if(listitem == 3)
{
GameTextForPlayer(playerid, "~r~Etage 2", 5000, 1);
SetPlayerPos(playerid,1102.0242,-842.7037,107.4617);
SetPlayerFacingAngle(playerid, 90.00);
}
}
}
So wenn ich dann beim Fahrstuhl bin zeigt er mir zwar das neue menü an aber kauft sachen aus dem gunshop obwohl ich fahrstuhl und waffenmenu definiert habe
mfg JoJu_RED