[FilterScript] Drinking(Bar) system with Dialog - by KaliKs using ZCMD
#1

Hey guys i thought i make a Bar system so you can buy some drinks ( PS: i didnt create any specific places for the bar so you have make em yourself)

im not totally sure if that works correctly but if you can find anything let me know ill try to fix it!

Код:
#include <ZCMD>


//***************[COLORS]******************//
#define COLOR_TWORANGE 0xFF8C00AA
#define COLOR_WHITE 0xFFFFFFAA

//under gamemodeinit
CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1);//change the coords to the same with under /buydrink
Create3DTextLabel("Bar\nBuy your Drink from here\n/buydrink", 0x008080FF, 1503.3359, 1432.3585, 10.1191, 0, 0);//also this have to be the same!

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
	switch(dialogid)
 	{
		case 200000:
  		{
 		switch(listitem)
 		{
  		case 0:
  		{
        SendClientMessage(playerid,COLOR_TWORANGE,"You Have bought Beer for 2$.");
		GivePlayerMoney(playerid,-2);
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
		SetPlayerDrunkLevel (playerid, 10000);
    	SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk: don't drink and drive!");
    	SetPlayerHealth(playerid, 100);
	    }
	    case 1:
	    {
        SendClientMessage(playerid,COLOR_WHITE,"You Have bought Vodka for 10$.");
		GivePlayerMoney(playerid,-10);
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
		SetPlayerDrunkLevel (playerid, 10000);
    	SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk: don't drink and drive!");
		SetPlayerHealth(playerid, 100);
		}
		case 2:
		{
  		SendClientMessage(playerid,COLOR_WHITE,"You Have bought Rum for 5$.");
		GivePlayerMoney(playerid,-5);
		SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER);
  		SetPlayerDrunkLevel (playerid, 10000);
    	SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk: don't drink and drive!");
    	SetPlayerHealth(playerid, 100);
                }
    			}
       			return 1;
            }
        }
    }
return 1;
}

CMD:buydrink(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2695.6880, -1704.6300, 11.8438))//Change this where ever you want
ShowPlayerDialog(playerid, 200000, DIALOG_STYLE_LIST, "{33AA33}Bartender:what can i offer you today sir?", "Beer(2$)\nVodka(10$)\nRum(5$)", "I would like to take this.", "Nothing Thank you.");
{
SendClientMessage(playerid,0xFFFFFFFF,"You are near a Bar!");
}
return 1;
}
youre Welcome and please give me feedback!
Reply
#2

great system yo but Please can you make tutorial of that how do i make to let player to buy drink only at the bar and not everywhere.
Reply
#3

Please don't bump old topic ROFL
Reply
#4

Some ScreenShots ? Please .

EDIT: Oh, sry, it's banned.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)