Business problem- Zgaming roleplay...
#1

Zgaming roleplay gamemode has dynamic business system with level system.

The problem is, Whatever the level of a business maybe, I can buy any item. Like Gascan is a level 5 item. Which means if the market doesn't have level 5, no one will be able to buy it. If the market have level 5, then it will be buyable.
But it is not working that way. Level 5 items can be bought from level 1 market...
How do I fix it?

Here's the code...

Код:
CMD:prices(playerid, params[])
{
	new idx = GetPlayerVirtualWorld(playerid)-100, string[128];
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	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)
	{
	    format(string, sizeof(string), "** %s's 24/7 Market menu list **", BizInfo[idx][bOwner]);
	    SendClientMessage(playerid, COLOR_ORANGE, string);
		if(BizInfo[idx][bLevel] >= 1) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 1: Cellphone ($100) | Phonebook ($50) | Dice ($20) | Cigar ($100)");
		if(BizInfo[idx][bLevel] >= 2) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 2: Speedometer ($200) | Sprunk ($30) | Spraycan ($100) | Rope ($60)");
		if(BizInfo[idx][bLevel] >= 3) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 3: Blindfold ($60) | WalkieTalkie ($200) | Smartphone($500)");
		if(BizInfo[idx][bLevel] >= 4) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 4: Camera ($300) | GasCan ($100)");
		//if(BizInfo[idx][bLevel] >= 5) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 5: Radio ($300)");
	}
	else if(BizInfo[idx][bType] == 3)
	{
	    format(string, sizeof(string), "** %s's Ammunation menu list **", BizInfo[idx][bOwner]);
	    SendClientMessage(playerid, COLOR_ORANGE, string);
		if(BizInfo[idx][bLevel] >= 1) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 1: 1) Shotgun Ammo ($400) | 2) Rifle Ammo ($2000)");
		if(BizInfo[idx][bLevel] >= 4) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 2: 3) Gun Ammo ($800)");
		if(BizInfo[idx][bLevel] >= 2) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 3: 4) Light-Machinegun Ammo ($1200)");
		if(BizInfo[idx][bLevel] >= 3) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 4: 5) Heavy-Machinegun Ammo ($2200)");
		if(BizInfo[idx][bLevel] >= 5) SendClientMessage(playerid, COLOR_WHITE, "UPGRADE 5: 6) Vest ($1000)");
	}
	else if(BizInfo[idx][bType] == 4)
	{
	    format(string, sizeof(string), "** %s's Club menu list **", BizInfo[idx][bOwner]);
	    SendClientMessage(playerid, COLOR_ORANGE, string);
		SendClientMessage(playerid, COLOR_WHITE, "1) Sprunk ($50) | 2) Beer ($100) | 3) Vodka ($200)");
	}
	else if(BizInfo[idx][bType] == 6)
	{
	    format(string, sizeof(string), "** %s's Fast Food menu list **", BizInfo[idx][bOwner]);
	    SendClientMessage(playerid, COLOR_ORANGE, string);
		SendClientMessage(playerid, COLOR_WHITE, "1) Small Meal ($10) | 2) Medium Meal ($30) | 3) Big Meal ($50)");
	}
	return 1;
}
Reply


Messages In This Thread
Business problem- Zgaming roleplay... - by razor steven - 24.05.2013, 16:31
Re: Business problem- Zgaming roleplay... - by Krakuski - 25.05.2013, 00:42
Re: Business problem- Zgaming roleplay... - by razor steven - 25.05.2013, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)