SA-MP Forums Archive
Biz 24/7 not work. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Biz 24/7 not work. (/showthread.php?tid=427035)



Biz 24/7 not work. - ajam123 - 31.03.2013

Here is my script buy, but when i go to the inside biz, it's said " You have not inside Business ". Anyway to fix it? Please help. The ammunation work but the 24/7 doesnt.


pawn Код:
CMD:buy(playerid, params[])
{
    new idx = GetPlayerVirtualWorld(playerid)-100;
    if(idx > 0 && idx < MAX_BIZ && BizInfo[idx][bType] != 1 && BizInfo[idx][bType] != 2 && BizInfo[idx][bType] != 3 && BizInfo[idx][bType] != 4 && BizInfo[idx][bType] != 6 || idx < 1 || idx > MAX_BIZ) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a business.");
    if(BizInfo[idx][bType] == 1)
    {
        ShowPlayerDialog(playerid, STOREMENU, DIALOG_STYLE_LIST, "24/7", "Cell Phone        $400\nPhone Book        $4000\nDice         $400\nCondom        $40\nCD Player      $40\nSpraycan       $160\nRope          $800\nCigar         $40\nSprunk         $8\nVehicle Lock        $4000\nPortable Radio       $40000\nCamera          $160\nLottery Ticket        $800\nCheckbook     $400\nMask          $5000\nSuitCase         $10000", "Buy", "Cancel");
    }
    else if(BizInfo[idx][bType] == 3)
    {
        ShowPlayerDialog(playerid, AMMUMENU, DIALOG_STYLE_LIST, "Ammunation Shop", "Shotgun (5000)\nMp5 (20000)\nDeagle (35000)\nM4 (75000)\nFullVest (3000)", "Buy", "Cancel");
    }
    return 1;
}



Re: Biz 24/7 not work. - Pottus - 31.03.2013

Код:
if(idx > 0 && idx < MAX_BIZ && BizInfo[idx][bType] != 1 && BizInfo[idx][bType] != 2 && BizInfo[idx][bType] != 3 && BizInfo[idx][bType] != 4 && BizInfo[idx][bType] != 6 || idx < 1 || idx > MAX_BIZ) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a business.");
What nonsense ass-backwards logic is this? It can't be anything other than Ravens Roleplay stop wasting your time.


Re: Biz 24/7 not work. - ajam123 - 31.03.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Код:
if(idx > 0 && idx < MAX_BIZ && BizInfo[idx][bType] != 1 && BizInfo[idx][bType] != 2 && BizInfo[idx][bType] != 3 && BizInfo[idx][bType] != 4 && BizInfo[idx][bType] != 6 || idx < 1 || idx > MAX_BIZ) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a business.");
What nonsense ass-backwards logic is this? It can't be anything other than Ravens Roleplay stop wasting your time.
I need help, Not need to have complaint.


Re: Biz 24/7 not work. - Pottus - 31.03.2013

You need a new script is what you need.


Re: Biz 24/7 not work. - EliteApple - 31.03.2013

Uh. What I would do, is use IsPlayerInRangeOf-.. something similar <--.

If the player is in the range of the area, command proceeds, if not, it doesn't work.


Re: Biz 24/7 not work. - ajam123 - 31.03.2013

Anyone can help?

p/s : i dont want like [uL]Pottus gay answer.