/drink doesn't work
#7

Код:
if(dialogid == 10)
		{
			if(response)
			{
				if(listitem==0)
				{
					if(PlayerInfo[playerid][pAge] < 16)
					{
					    SendClientMessage(playerid, COLOR_WHITE, "Bartender: Sorry, you need to be 16 years to get this drink.");
					    return 1;
					}
					new Float:health;
				    GivePlayerMoney(playerid, - 6);
				    PlayerDrunk[playerid] += 1;
				    SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+2000);
					if(PlayerDrunk[playerid] >= 5)
					{
						GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1);
					}
					if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0)
						{
							PlayerDrunk[playerid] += 1;
							new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
							hp += 15;
							SetPlayerHealth(playerid, health + hp);
						}
						else
						{
							SetPlayerHealth(playerid, health + 15.0);
						}
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
						BizzInfo[2][bTill] += 6;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a beer.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==1)
				{
				    if(PlayerInfo[playerid][pAge] < 18)
					{
					    SendClientMessage(playerid, COLOR_WHITE, "Bartender: Sorry, you need to be 16 years to get this drink.");
					    return 1;
					}
					new Float:health;
				    GivePlayerMoney(playerid, - 15);
				    PlayerDrunk[playerid] += 3;
				    SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+2000);
					if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
					if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 27.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 15;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a vodka.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
                if(listitem==2)
				{
				    if(PlayerInfo[playerid][pAge] < 18)
					{
					    SendClientMessage(playerid, COLOR_WHITE, "Bartender: Sorry, you need to be 16 years to get this drink.");
					    return 1;
					}
					new Float:health;
				    GivePlayerMoney(playerid, - 15);
				    PlayerDrunk[playerid] += 3;
				    SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+2000);
					if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
					if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 27.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 15;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a whiskey.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==3)
				{
				    if(PlayerInfo[playerid][pAge] < 18)
					{
	    				SendClientMessage(playerid, COLOR_WHITE, "Bartender: Sorry, you need to be 16 years to get this drink.");
					    return 1;
					}
					new Float:health;
				    GivePlayerMoney(playerid, - 10);
				    PlayerDrunk[playerid] += 3;
				    SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+2000);
					if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
					if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 30.0); }
												}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 10;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a wine.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==4)
				{
				    if(PlayerInfo[playerid][pAge] < 18)
					{
					    SendClientMessage(playerid, COLOR_WHITE, "Bartender: Sorry, you need to be 16 years to get this drink.");
					    return 1;
					}
					new Float:health;
	    			GivePlayerMoney(playerid, - 20);
				    PlayerDrunk[playerid] += 5;
				    SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+2000);
					if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
					if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 10.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 20;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a tequila.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==5)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 2);
				    if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 5.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 2;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a wather.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==6)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 2);
				    if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 5.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 2;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a soda.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==7)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 5);
				    if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 5.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 5;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a coca-cola.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==8)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 5);
	   				if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 5.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 5;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a schweppes.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==9)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 7);
			    	if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 10.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 7;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a prigat.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==10)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 7);
			    	if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 10.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 7;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a fanta.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==11)
				{
				    new Float:health;
    				ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
				    GivePlayerMoney(playerid, - 7);
				    if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 10.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 7;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a sprite.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==12)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 3);
			    	if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 10.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 3;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a caffe.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
				if(listitem==13)
				{
				    new Float:health;
                    ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.0999, 0, 1, 1, 1, 1);
    				GivePlayerMoney(playerid, - 7);
				    if(GetPlayerHealth(playerid, health) < 100)
					{
					    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
						else { SetPlayerHealth(playerid, health + 15.0); }
					}
					if(PlayerToPoint(3.0,playerid,-783.4417,500.1744,1371.7422) || PlayerToPoint(3.0,playerid,-788.3983,500.4243,1371.7422))
					{
					BizzInfo[2][bTill] += 7;
					}
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* %s drinks a cocktail.", sendername);
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}
			}
		}
Reply


Messages In This Thread
/drink doesn't work - by MrBlake - 29.07.2011, 15:50
Re: /drink doesn't work - by iPLEOMAX - 29.07.2011, 16:05
Re: /drink doesn't work - by Snipa - 29.07.2011, 16:36
Re: /drink doesn't work - by MrBlake - 29.07.2011, 17:49
Re: /drink doesn't work - by JackBauer. - 29.07.2011, 19:17
Re: /drink doesn't work - by Snipa - 29.07.2011, 19:20
Re: /drink doesn't work - by MrBlake - 30.07.2011, 06:51
Re: /drink doesn't work - by TouR - 30.07.2011, 09:01
Re: /drink doesn't work - by MrBlake - 30.07.2011, 09:29
Re: /drink doesn't work - by MrBlake - 30.07.2011, 09:33

Forum Jump:


Users browsing this thread: 1 Guest(s)