Hay Leute ich habe da so ein Problem mit meinem 24/7 laden ja ämm wenn ich was kaufen will steht da die ganze zeit ausverkauft und bei meinem Houseupgrade die selber scheiße ich weiß nicht was für bug das ist hier mal 24/7 shop
PHP
if(strcmp(cmd, "/buy", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (!IsPlayerInRangeOfPoint(playerid,100.0,-30.875, -88.9609, 1004.53))//centerpoint 24-7
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist nicht im 24-7 !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "BENUTZUNG: /buy [Itemnummer]");
SendClientMessage(playerid, COLOR_GREEN, "_________ 24-7 _________");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Telefon $100 2: Rubbellos $5");
SendClientMessage(playerid, COLOR_GRAD2, "| 3: Telefon Buch $50 4: Würfel $5");
SendClientMessage(playerid, COLOR_GRAD4, "| 5: Kondom $8 6: CD-Player $50");
SendClientMessage(playerid, COLOR_GRAD5, "| 7: Chicken $5 8: Hamburger $3 ");
SendClientMessage(playerid, COLOR_GRAD5, "| 9: Kekse $10 10: Zigaretten 50$");
SendClientMessage(playerid, COLOR_GRAD5, "| 11: Dynamite 1.000.000$");
return 1;
}
new item = strval(tmp);
if(SBizzInfo[8][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1);
return 1;
}
if (item == 1 && GetPlayerMoney(playerid) > 100)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new payout = 50;
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,- payout);
SBizzInfo[8][sbTill] += payout;
SBizzInfo[8][sbProducts] -= 1;
ExtortionSBiz(8, payout);
}
else
{
format(string, sizeof(string), "~r~-$%d", 500);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-100);
SBizzInfo[8][sbTill] += 100;
SBizzInfo[8][sbProducts] -= 1;
ExtortionSBiz(8, 100);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new randphone = 1000 + random(8999);//minimum 1000 max 9999
PlayerInfo[playerid][pPnumber] = randphone;
SBizzInfo[8][sbProducts] -= 1;
format(string, sizeof(string), " Telefon gekauft! Deine Telefonnummer lautet %d", randphone);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD5, "Du kannst sie jederzeit mit /stats nachgucken.");
SendClientMessage(playerid, COLOR_WHITE, "HILFE: Du kannst /help eingeben um die Befehle zu sehen.");
return 1;
}
else if (item == 2 && GetPlayerMoney(playerid) > 5)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new payout = 2;
GivePlayerMoney(playerid,- payout);
SBizzInfo[8][sbTill] += payout;
SBizzInfo[8][sbProducts] -= 1;
ExtortionSBiz(8, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-5);
SBizzInfo[8][sbTill] += 5;
SBizzInfo[8][sbProducts] -= 1;
ExtortionSBiz(8, 5);
format(string, sizeof(string), "~r~-$%d", 1000);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new prize;
new symb1[32]; new symb2[32]; new symb3[32];
new randcard1 = random(10);//minimum 1000 max 9999
new randcard2 = random(10);//minimum 1000 max 9999
new randcard3 = random(10);//minimum 1000 max 9999
if(randcard1 >= 5)
{
Alles anzeigen