So vorn paar tagen musste ichs erver usw neu aufsetzen un dann ging das script net un hatte nurn uraltes backup.
Jetzt habe ich den supermarkt dialog eingefügt aber wenn ich etwas kaufen will passiert nix mehr <,<
if(dialogid == menu247)
{
if(response)
{
if(listitem == 0)
{
if (GetPlayerMoney(playerid) > 199)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 200 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 200 - price;
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
}
else
{
format(string, sizeof(string), "~r~-$%d", 200);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-200);
SBizzInfo[9][sbTill] += 500;
ExtortionSBiz(9, 500);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new randphone = 1000 + random(8999);//minimum 1000 max 9999
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), "Du hast ein Telefon gekauft. Deine Nummer ist %d.", randphone);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Deine Nummer kannst du oben rechts sehen.");
return 1;
}
}
if(listitem == 1)
{
if (GetPlayerMoney(playerid) > 99)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 100 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 100 - price;
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-100);
SBizzInfo[9][sbTill] += 100;
ExtortionSBiz(9, 100);
format(string, sizeof(string), "~r~-$%d", 100);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pPhoneBook] = 1;
format(string, sizeof(string), "Du hast dir ein Telefonbuch gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Um das Telefonbuch zu durchstöbern, tippe /number [ID].");
return 1;
}
}
if(listitem == 2)
{
if (GetPlayerMoney(playerid) > 399)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 400 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 400 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, - 400);
format(string, sizeof(string), "~r~-$%d", 400);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Du hast einen CD-Player gekauft. Du kannst ihn mit /music benutzen.");
SendClientMessage(playerid, COLOR_GRAD4, string);
PlayerInfo[playerid][pCDPlayer] = 1;
return 1;
}
}
if(listitem == 3)
{
if (GetPlayerMoney(playerid) > 499)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 500 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 500 - price;
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-500);
SBizzInfo[9][sbTill] += 500;
ExtortionSBiz(9, 500);
format(string, sizeof(string), "~r~-$%d", 500);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
gDice[playerid] = 1;
format(string, sizeof(string), "Du hast einen Würfel gekauft. Du kannst den Würfel mit /dice benutzen.");
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
if(listitem == 4)
{
if (GetPlayerMoney(playerid) > 49)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 50 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 50 - price;
GivePlayerMoney(playerid,- payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-50);
format(string, sizeof(string), "~r~-$%d", 50);
GameTextForPlayer(playerid, string, 5000, 1);
}
Condom[playerid] ++;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Du hast ein Kondom gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
}
if(listitem == 5)
{
if (GetPlayerMoney(playerid) > 9)
{
if(Groceries[playerid][pChickens] >= 3)
{
SendClientMessage(playerid, COLOR_GREY, "Du hast zuviele Hühnchen!");
return 1;
}
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 10 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 10 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, - 10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
}
GivePlayerMoney(playerid, - 10);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Du hast ein Hühnchen gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
new rand = random(15);
Groceries[playerid][pChickens] += 1;
Groceries[playerid][pChicken] += rand;
return 1;
}
}
if(listitem == 6)
{
if (GetPlayerMoney(playerid) > 10)
{
if(Groceries[playerid][pHamburgers] >= 3)
{
SendClientMessage(playerid, COLOR_GREY, "Du hast zuviele Hamburger!");
return 1;
}
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 10 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 10 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, - 10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
}
GivePlayerMoney(playerid, - 10);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Du hast einen Hamburger gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
new rand = random(15);
Groceries[playerid][pHamburgers] += 1;
Groceries[playerid][pHamburger] += rand;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Du hast zuwenig Geld!");
}
return 1;
}
}
Was ist daran falsch`?