17.06.2010, 16:18
Hey, this codes' been bugging me for a bit now. Here's a little detail: My business system needs products for items to be bought, now, so the business i'm buying from has 0 products, OK, but i'm still able to buy the item, it says:
but then it still shows the menu of what item i'd like to buy. Can someone check this out..
I tried using return 0 and ignoring the message and return 1, but the same effect.
Quote:
Originally Posted by Text
[Error]: This store has no products
|
pawn Код:
command(buy, playerid, params[]) {
new stringformat[128];
for(new i = 0; i < TOTAL_BUSINESSES; i ++ ) {
if(IsPlayerInRangeOfPoint(playerid, 55.0, BizData[i][bExPos][0],BizData[i][bExPos][1],BizData[i][bExPos][2])) {
if(BizData[i][bProducts] < 1) return SendClientMessage(playerid, COLOR_SYSTEM, "[Error]: This store has no products.");
switch(BizData[i][bType]) {
case 0: {
// The rest of the code doesn't need to be shown, but you get the process, it goes to the cases even thought I returned the message and the products are 0