pawn Код:
if(strcmp(cmd, "/buy", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 50,-30.875, -88.9609, 1004.53))//centerpoint 24-7
{
if(BizzInfo[7][bProducts] == 0 || BizzInfo[8][bProducts] == 0 || BizzInfo[9][bProducts] == 0 || BizzInfo[10][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
new Buyitems[] = "1\tCellphone ($150)\n2\tScratch Card ($500)\n3\tPhone Book ($10)\n4\tDice ($10)\n5\tGas Can ($20)\n6\tCondom ($1)\n7\tCamera ($50)\n8\tMask ($500)\n9\tWatch ($100)\n10\tFishing Tools ($150$)\n11\tRope ($10)\n12\tSpray Can ($50)\n13\tLighter ($5)\n14\tCigarretes ($30\n15\tCD Player ($250)\n16\tVehicle GPS Add-On ($1500)\n17\tSpeed-o-Metter ($500)";
ShowPlayerDialog(playerid,69,DIALOG_STYLE_LIST,"24-7 Market",Buyitems,"Select","Cancel");
}
else if (IsPlayerInRangeOfPoint(playerid, 50, -106.0233,-11.1038,1000.7188))
{
new Buysexitems[] = "1\tPurple Dildo ($50)\n2\tBig white Vibrator ($35)\n3\tSmall White Vibrator($10)\n4\tSilver Vibrator ($15)\n5\tCondom ($1)";
ShowPlayerDialog(playerid,88,DIALOG_STYLE_LIST,"Sex Shop",Buysexitems,"Select","Cancel");
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /buy",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
}
Why did you use an exact business ID? Are you sure that the business ID you're trying to get the product is actually NOT 7, 8, 9 or 10? Also, you probably want to do that since you'll receive that error if ANY of the businesses don't have the product;