Guest User

dRestaurants Config

a guest
Jun 5th, 2023
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.54 KB | Source Code | 0 0
  1. Config = {}
  2.  
  3. Config.MarkerInteractionKey = 38 -- E by default (If you will change this, also you need to change all of the ~INPUT_CONTEXT~ into the one that u change)
  4.  
  5. Config.OrderItem = ''
  6.  
  7. Config.Restaurants = {
  8.     ['Drusilla'] = {
  9.         Webhook = '', -- webhook to some logs
  10.         JobName = 'drusilla',
  11.         Storage = vector3(-1199.6661, -896.8015, 13.09742), -- ox inventory stash coords
  12.         BossMenu = vector3(-1178.3867, -895.8124, 13.09742), -- boss menu coords (esx_society)
  13.         Clothing = vector3(-1181.2103, -900.3879, 13.0742), -- clothing coords
  14.         CookingArea = vector3(-1199.1642, -903.7907, 13.0742), -- cooking coords
  15.         OrdersStash = vector3(-1202.6117, -899.5175, 13.9742), -- Place when player orders will come as an item
  16.         StartingMoney = 10000, -- Money that the restaurant will get when created
  17.         OrderStashData = {
  18.             slots = 20,
  19.             weight = 50000 -- 50kg
  20.         },
  21.         StashData = {
  22.             slots = 50,
  23.             weight = 100000 -- 100 kg
  24.         },
  25.         BlipInfo = {
  26.             name = 'Drusilla`s restaurant',
  27.             coords = {x = -1199.9668, y = -901.5309,  z = 13.9742},
  28.             sprite = 1,
  29.             size = 0.8,
  30.             color = 2,
  31.             display = 4
  32.  
  33.         },
  34.         IngredientShop = {
  35.             name = 'Corner Shop 3',
  36.             id = 'drusilla_ingredient_shop',
  37.             items = {
  38.                 { name = 'hamburger', price = 10 },
  39.                 { name = 'water', price = 10 },
  40.                 { name = 'ecola', price = 10 },
  41.             },
  42.             location = vector3(-1197.8801, -887.2239, 13.9742)
  43.         },
  44.  
  45.         Food = {                                                        -- put here any food that restaurant will sell
  46.  
  47.         ['Hamburger'] = {
  48.             itemname = 'hamburger',
  49.             description = 'Tasty mf',
  50.             ingredients = {
  51.                 {name = 'water', amount = 1, label = 'Water'},
  52.             },
  53.             time = 15000,
  54.             price = 20
  55.         },
  56.  
  57.         ['E-Cola'] = {
  58.             itemname = 'ecola',
  59.             description = 'Tasty mf',
  60.             ingredients = {
  61.                 {name = 'water', amount = 1, label = 'Water'},
  62.             },
  63.             time = 10000,
  64.             price = 10
  65.         },
  66.  
  67.         }
  68.     },
  69.  
  70.     ['La papa`s'] = {
  71.         Webhook = '', -- webhook to some logs
  72.         JobName = 'lapapas',
  73.         Storage = vector3(-1199.6661, -896.8015, 13.09742), -- ox inventory stash coords
  74.         BossMenu = vector3(-1178.3867, -895.8124, 13.09742), -- boss menu coords (esx_society)
  75.         Clothing = vector3(-1181.2103, -900.3879, 13.0742), -- clothing coords
  76.         CookingArea = vector3(-1199.1642, -903.7907, 13.0742), -- cooking coords
  77.         OrdersStash = vector3(-1202.6117, -899.5175, 13.9742), -- Place when player orders will come as an item
  78.         StartingMoney = 10000, -- Money that the restaurant will get when created
  79.         OrderStashData = {
  80.             slots = 20,
  81.             weight = 50000 -- 50kg
  82.         },
  83.         StashData = {
  84.             slots = 50,
  85.             weight = 100000 -- 100 kg
  86.         },
  87.         BlipInfo = {
  88.             name = 'La papa`s restaurant',
  89.             coords = {x = -1199.9668, y = -901.5309,  z = 13.9742},
  90.             sprite = 1,
  91.             size = 0.8,
  92.             color = 2,
  93.             display = 4
  94.  
  95.         },
  96.         IngredientShop = {
  97.             name = 'Corner Shop 3',
  98.             id = 'lapapas_ingredient_shop',
  99.             items = {
  100.                 { name = 'hamburger', price = 10 },
  101.                 { name = 'water', price = 10 },
  102.                 { name = 'ecola', price = 10 },
  103.             },
  104.             location = vector3(-1197.8801, -887.2239, 13.9742)
  105.         },
  106.  
  107.         Food = {                                                        -- put here any food that restaurant will sell
  108.  
  109.         ['Hamburger'] = {
  110.             itemname = 'hamburger',
  111.             description = 'Tasty mf',
  112.             ingredients = {
  113.                 {name = 'water', amount = 1, label = 'Water'},
  114.             },
  115.             time = 15000,
  116.             price = 20
  117.         },
  118.  
  119.         ['E-Cola'] = {
  120.             itemname = 'ecola',
  121.             description = 'Tasty mf',
  122.             ingredients = {
  123.                 {name = 'water', amount = 1, label = 'Water'},
  124.             },
  125.             time = 10000,
  126.             price = 10
  127.         },
  128.  
  129.         }
  130.     },
  131.  
  132.    
  133. }
  134.  
  135.  
  136. RegisterNetEvent('dRestaurants:customNotification', function(header, msg, time)
  137.     -- ESX.ShowNotification(msg)
  138.     lib.notify({
  139.         id = 'dRestaurantsNotify',
  140.         title = header,
  141.         description = msg,
  142.         position = 'top',
  143.         style = {
  144.             backgroundColor = '#242424',
  145.             color = '#909296'
  146.         },
  147.         icon = 'burger',
  148.         iconColor = '#2a726f',
  149.         duration = time
  150.     })
  151. end)
  152.  
  153.  
  154. RegisterNetEvent('dRestaurants:bossMenuOpen', function(job)
  155.     TriggerEvent('esx_society:openBossMenu', job, function(data, menu)
  156.         menu.close()
  157.  
  158.         CurrentAction     = 'menu_boss_actions'
  159.         CurrentActionMsg  = 'boss menu'
  160.         CurrentActionData = {}
  161.     end, { wash = false })
  162. end)
  163.  
  164.  
  165. RegisterNetEvent('dRestaurants:customProgressBar', function(msg, time)
  166.     -- you can set your own progress bar here
  167.  
  168.     TriggerEvent('rprogress:start', msg, tonumber(time))
  169. end)
  170.  
  171.  
  172. RegisterNetEvent('dRestaurants:clothingMenuOpen', function()
  173.     -- EXAMPLE FOR  FIVEM APPEARANCE if u want to use ur own skin/appearance then just go and search for skin menu event in their documentation
  174.     -- local config = {
  175.     --     ped = true,
  176.     --     headBlend = true,
  177.     --     faceFeatures = true,
  178.     --     headOverlays = true,
  179.     --     components = true,
  180.     --     props = true,
  181.     --     allowExit = true,
  182.     --     tattoos = true
  183.     --   }
  184.    
  185.     --   exports['fivem-appearance']:startPlayerCustomization(function (appearance)
  186.     --     if (appearance) then
  187.     --       print('Saved')
  188.     --     else
  189.     --       print('Canceled')
  190.     --     end
  191.     --   end, config)
  192.  
  193.  
  194.     TriggerEvent('esx_skin:openSaveableMenu')
  195. end)
  196.  
  197.  
  198.  
  199. Config.Lang = {
  200.     ['Count'] = ' x ', -- for example "You dont have .. x .. of meat to cook hamburger"
  201.     ['MissingIngredients'] = "You're missing ingredients! List:\n",
  202.     ['Error'] = "Error!",
  203.     ['Success'] = "Success!",
  204.     ['StashName'] = 'Stash ', -- "Stash Drusilla" etc.
  205.     ['OrderStashName'] = 'Order Stash ', -- "Order Stash Drusilla" etc.
  206.     ['MissingShop'] = 'Could not find the shop!',
  207.     ['CookingHelpText'] = 'Press ~INPUT_CONTEXT~ to open cooking menu',
  208.     ['StashHelpText'] = 'Press ~INPUT_CONTEXT~ to access the stash',
  209.     ['BossHelpText'] =  'Press ~INPUT_CONTEXT~ to open boss menu',
  210.     ['ClothingHelpText'] = 'Press ~INPUT_CONTEXT~ to access the clothing menu',
  211.     ['OrderStashHelpText'] = 'Press ~INPUT_CONTEXT~ to access the order stash ',
  212.     ['IngredientShopHelpText'] = 'Press ~INPUT_CONTEXT~ to access the ingredient shop',
  213.     ['OrderingHelpText'] = 'Press ~INPUT_CONTEXT~ to access the ordering menu',
  214.     ['MakingFood'] = 'You are preparing %s ', -- food name
  215.     ['MadeFood'] = 'You have prepared %s ', -- food name
  216.     ['WebhookMadeFood'] = '%s has prepared %s', -- Player name prepared food name
  217.     ['CookingMenuTitle'] = 'Cooking Menu',
  218.     ['SelectFood'] = 'Please select the food you want to order',
  219.     ['OrderFoodInfo'] = 'Enter more info (amount of food ex. "4x fries, 2x chicken")',
  220.     ['InputError'] = 'Please fill every space in the input menu!',
  221.     ['InputCancelled'] = 'You have cancelled order creation',
  222.     ['MissingMoney'] = 'You dont have enough money! You need %s$ more!', -- missing money amount
  223.     ['NewOrderInfo'] = 'You have received a new order from a player with ID [%s]',
  224.     ['SelectRestaurant'] = 'Please select the restaurant you want to order from',
  225.     ['GetCurrentPosition'] = 'Do you want to use your current position?',
  226.     ['NewOrderCustomer'] = 'You have created a new order! Restaurant workers count: %s worker/s are online!\n\n Do not move away from the area, the restaurant worker is coming to your location\n\nIf there is 0 workers, you will get one of each item you ordered',
  227.     ['WaypointSet'] = 'New waypoint has been set! Check your GPS',
  228.     ['WebhookNewOrder'] = 'A new order has came in! Check your order stash! Player name: %s , Player ID: %s',
  229.     ['AdditionalCustomerInfo'] = "\n\nAdditional customer info: \n\n",
  230.     ['ChooseRestaurantTitle'] = 'Choose restaurant',
  231.     ['OrderingTitle'] = 'Order',
  232. }
  233.  
  234. https://discord.gg/6c3Qtz7G
Tags: lua
Add Comment
Please, Sign In to add comment