├── .gitattributes
├── .editorconfig
├── fxmanifest.lua
├── localization
└── en_es_extended.sql
├── esx_unicornjob.sql
├── README.md
├── locales
├── en.lua
├── cs.lua
├── sv.lua
└── fr.lua
├── config.lua
├── server
└── main.lua
├── LICENSE.txt
└── client
└── main.lua
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_size = 2
5 | indent_style = space
6 | end_of_line = lf
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
--------------------------------------------------------------------------------
/fxmanifest.lua:
--------------------------------------------------------------------------------
1 | fx_version 'adamant'
2 |
3 | game 'gta5'
4 |
5 | description 'ESX Unicorn Job'
6 |
7 | version '1.1.0'
8 |
9 | client_scripts {
10 | '@es_extended/locale.lua',
11 | 'locales/en.lua',
12 | 'locales/fr.lua',
13 | 'locales/sv.lua',
14 | 'locales/cs.lua',
15 | 'config.lua',
16 | 'client/main.lua'
17 | }
18 |
19 | server_scripts {
20 | '@es_extended/locale.lua',
21 | 'locales/en.lua',
22 | 'locales/fr.lua',
23 | 'locales/sv.lua',
24 | 'locales/cs.lua',
25 | 'config.lua',
26 | 'server/main.lua'
27 | }
28 |
--------------------------------------------------------------------------------
/localization/en_es_extended.sql:
--------------------------------------------------------------------------------
1 | SET @job_name = 'unicorn';
2 | SET @society_name = 'society_unicorn';
3 | SET @job_Name_Caps = 'Unicorn';
4 |
5 |
6 |
7 | INSERT INTO `addon_account` (name, label, shared) VALUES
8 | (@society_name, @job_Name_Caps, 1)
9 | ;
10 |
11 | INSERT INTO `addon_inventory` (name, label, shared) VALUES
12 | (@society_name, @job_Name_Caps, 1),
13 | ('society_unicorn_fridge', 'Unicorn (fridge)', 1)
14 | ;
15 |
16 | INSERT INTO `datastore` (name, label, shared) VALUES
17 | (@society_name, @job_Name_Caps, 1)
18 | ;
19 |
20 | INSERT INTO `jobs` (name, label, whitelisted) VALUES
21 | (@job_name, @job_Name_Caps, 1)
22 | ;
23 |
24 | INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
25 | (@job_name, 0, 'barman', 'Bartender', 300, '{}', '{}'),
26 | (@job_name, 1, 'dancer', 'Dancer', 300, '{}', '{}'),
27 | (@job_name, 2, 'viceboss', 'Co-Manager', 500, '{}', '{}'),
28 | (@job_name, 3, 'boss', 'Manager', 600, '{}', '{}')
29 | ;
30 |
31 | INSERT INTO `items` (`name`, `label`, `limit`) VALUES
32 | ('jager', 'Jägermeister', 5),
33 | ('vodka', 'Vodka', 5),
34 | ('rhum', 'Rhum', 5),
35 | ('whisky', 'Whisky', 5),
36 | ('tequila', 'Tequila', 5),
37 | ('martini', 'White Martini', 5),
38 | ('soda', 'Soda', 5),
39 | ('jusfruit', 'Fruit juice', 5),
40 | ('icetea', 'Ice Tea', 5),
41 | ('energy', 'Energy Drink', 5),
42 | ('drpepper', 'Dr. Pepper', 5),
43 | ('limonade', 'Lemonade', 5),
44 | ('bolcacahuetes', 'Bowl of peanuts', 5),
45 | ('bolnoixcajou', 'Bowl of cashew nuts', 5),
46 | ('bolpistache', 'Bowl of pistachios', 5),
47 | ('bolchips', 'Bowl of crisps', 5),
48 | ('saucisson', 'Sausage', 5),
49 | ('grapperaisin', 'Bunch of grapes', 5),
50 | ('jagerbomb', 'Jägerbomb', 5),
51 | ('golem', 'Golem', 5),
52 | ('whiskycoca', 'Whisky-coke', 5),
53 | ('vodkaenergy', 'Vodka-energy', 5),
54 | ('vodkafruit', 'Vodka-fruit juice', 5),
55 | ('rhumfruit', 'Rhum-fruit juice', 5),
56 | ('teqpaf', "Teq'paf", 5),
57 | ('rhumcoca', 'Rhum-coke', 5),
58 | ('mojito', 'Mojito', 5),
59 | ('ice', 'Ice', 5),
60 | ('mixapero', 'Aperitif Mix', 3),
61 | ('metreshooter', 'Shooter meter', 3),
62 | ('jagercerbere', 'Jäger Cerberus', 3),
63 | ('menthe', 'Mint leaf', 10)
64 | ;
65 |
--------------------------------------------------------------------------------
/esx_unicornjob.sql:
--------------------------------------------------------------------------------
1 | SET @job_name = 'unicorn';
2 | SET @society_name = 'society_unicorn';
3 | SET @job_Name_Caps = 'Unicorn';
4 |
5 |
6 |
7 | INSERT INTO `addon_account` (name, label, shared) VALUES
8 | (@society_name, @job_Name_Caps, 1)
9 | ;
10 |
11 | INSERT INTO `addon_inventory` (name, label, shared) VALUES
12 | (@society_name, @job_Name_Caps, 1),
13 | ('society_unicorn_fridge', 'Unicorn (frigo)', 1)
14 | ;
15 |
16 | INSERT INTO `datastore` (name, label, shared) VALUES
17 | (@society_name, @job_Name_Caps, 1)
18 | ;
19 |
20 | INSERT INTO `jobs` (name, label, whitelisted) VALUES
21 | (@job_name, @job_Name_Caps, 1)
22 | ;
23 |
24 | INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
25 | (@job_name, 0, 'barman', 'Barman', 300, '{}', '{}'),
26 | (@job_name, 1, 'dancer', 'Danseur', 300, '{}', '{}'),
27 | (@job_name, 2, 'viceboss', 'Co-gérant', 500, '{}', '{}'),
28 | (@job_name, 3, 'boss', 'Gérant', 600, '{}', '{}')
29 | ;
30 |
31 | INSERT INTO `items` (`name`, `label`, `limit`) VALUES
32 | ('jager', 'Jägermeister', 5),
33 | ('vodka', 'Vodka', 5),
34 | ('rhum', 'Rhum', 5),
35 | ('whisky', 'Whisky', 5),
36 | ('tequila', 'Tequila', 5),
37 | ('martini', 'Martini blanc', 5),
38 | ('soda', 'Soda', 5),
39 | ('jusfruit', 'Jus de fruits', 5),
40 | ('icetea', 'Ice Tea', 5),
41 | ('energy', 'Energy Drink', 5),
42 | ('drpepper', 'Dr. Pepper', 5),
43 | ('limonade', 'Limonade', 5),
44 | ('bolcacahuetes', 'Bol de cacahuètes', 5),
45 | ('bolnoixcajou', 'Bol de noix de cajou', 5),
46 | ('bolpistache', 'Bol de pistaches', 5),
47 | ('bolchips', 'Bol de chips', 5),
48 | ('saucisson', 'Saucisson', 5),
49 | ('grapperaisin', 'Grappe de raisin', 5),
50 | ('jagerbomb', 'Jägerbomb', 5),
51 | ('golem', 'Golem', 5),
52 | ('whiskycoca', 'Whisky-coca', 5),
53 | ('vodkaenergy', 'Vodka-energy', 5),
54 | ('vodkafruit', 'Vodka-jus de fruits', 5),
55 | ('rhumfruit', 'Rhum-jus de fruits', 5),
56 | ('teqpaf', "Teq'paf", 5),
57 | ('rhumcoca', 'Rhum-coca', 5),
58 | ('mojito', 'Mojito', 5),
59 | ('ice', 'Glaçon', 5),
60 | ('mixapero', 'Mix Apéritif', 3),
61 | ('metreshooter', 'Mètre de shooter', 3),
62 | ('jagercerbere', 'Jäger Cerbère', 3),
63 | ('menthe', 'Feuille de menthe', 10)
64 | ;
65 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # esx_unicornjob
2 |
3 | ESX UNICORN JOB
4 |
5 |
6 | [REQUIREMENTS]
7 |
8 | * Player management (billing and boss actions)
9 | * esx_society => https://github.com/ESX-Org/esx_society
10 | * esx_billing => https://github.com/ESX-Org/esx_billing
11 |
12 | * Items effects (hunger, thirst, drunk)
13 | * esx_status => https://github.com/ESX-Org/esx_status
14 | * esx_basicneeds => https://github.com/ESX-Org/esx_basicneeds
15 | * esx_optionalsneeds => https://github.com/ESX-Org/esx_optionalneeds
16 | * Items and effects should be added separately in their appropriate files
17 | * You need to add animations + items effects (basicneeds, optionnalneeds) for an optimal experience
18 |
19 |
20 | [INSTALLATION]
21 |
22 | 1) CD in your resources/[esx] folder
23 |
24 | 3) Import esx_unicornjob.sql in your database
25 |
26 | 4) Add this in your server.cfg :
27 |
28 | ```
29 | start esx_unicornjob
30 | ```
31 | 5) If you want player management you have to set Config.EnablePlayerManagement to true in config.lua
32 | You can config VaultManagement & Helicopters with true/false (don't forget to comment the area in the same file)
33 |
34 | 6) If you want real effects, add items and effects in esx_basicneeds and esx_optionalsneeds.
35 |
36 | Here are examples of what you could add:
37 |
38 | esx_basicneeds\server\main.lua:
39 | ```lua
40 | ESX.RegisterUsableItem('icetea', function(source)
41 |
42 | local xPlayer = ESX.GetPlayerFromId(source)
43 |
44 | xPlayer.removeInventoryItem('icetea', 1)
45 |
46 | TriggerClientEvent('esx_status:add', source, 'thirst', 300000)
47 | TriggerClientEvent('esx_basicneeds:onDrink', source)
48 | TriggerClientEvent('esx:showNotification', source, _U('used_icetea'))
49 |
50 | end)
51 |
52 | ESX.RegisterUsableItem('mixapero', function(source)
53 |
54 | local xPlayer = ESX.GetPlayerFromId(source)
55 |
56 | xPlayer.removeInventoryItem('mixapero', 1)
57 |
58 | TriggerClientEvent('esx_status:add', source, 'hunger', 100000)
59 | TriggerClientEvent('esx_status:remove', source, 'thirst', 50000)
60 | TriggerClientEvent('esx_basicneeds:onEat', source)
61 | TriggerClientEvent('esx:showNotification', source, _U('used_mixapero'))
62 |
63 | end)
64 | ```
65 |
66 |
67 | esx_optionalneeds\server\main.lua:
68 | ```lua
69 | ESX.RegisterUsableItem('tequila', function(source)
70 |
71 | local xPlayer = ESX.GetPlayerFromId(source)
72 |
73 | xPlayer.removeInventoryItem('tequila', 1)
74 |
75 | TriggerClientEvent('esx_status:add', source, 'drunk', 300000)
76 | TriggerClientEvent('esx_optionalneeds:onDrink', source)
77 | TriggerClientEvent('esx:showNotification', source, _U('used_tequila'))
78 |
79 | end)
80 |
81 | ESX.RegisterUsableItem('jagerbomb', function(source)
82 |
83 | local xPlayer = ESX.GetPlayerFromId(source)
84 |
85 | xPlayer.removeInventoryItem('jagerbomb', 1)
86 |
87 | TriggerClientEvent('esx_status:add', source, 'drunk', 500000)
88 | TriggerClientEvent('esx_status:remove', source, 'hunger', 10000)
89 | TriggerClientEvent('esx_status:remove', source, 'thirst', 70000)
90 | TriggerClientEvent('esx_optionalneeds:onDrink', source)
91 | TriggerClientEvent('esx:showNotification', source, _U('used_jagerbomb'))
92 |
93 | end)
94 | ```
95 |
96 |
97 | [FEATURES]
98 |
99 | * Vanilla Unicorn job
100 | * Fully customizable job
101 | * Boss, Bartender, Dancer grades
102 | * Cloakroom, Vault, Fridge, Vehicles, BossActions
103 | * Cloakroom : Dancer clothing with special movement effect, multiple clothes for men or women
104 | * Shops (harvesting) for components (alcoholic drinks, appetizers, non-alcoholic drinks)
105 | * Crafting menu for Bosses + Bartender (only with the right clothing) : coktails, mix appetizers
106 | * Spawning car without dust
107 | * Teleport marker to be behind the bar
108 | * Players can miss the crafting part (~10% miss) and lose the components used
109 | * Billing menu
110 | * Girl are not supplied
111 |
112 |
113 |
114 | [SHOPS (HARVESTING) AREAS]
115 |
116 | * Alcoholic drinks => https://i.imgur.com/CIrpHfm.png
117 | * Non-alcoholic drinks => https://i.imgur.com/QC3UeA2.png
118 | * Appetizers => https://i.imgur.com/YYYrAQP.png
119 |
--------------------------------------------------------------------------------
/locales/en.lua:
--------------------------------------------------------------------------------
1 | Locales['en'] = {
2 | -- Cloakroom
3 | ['cloakroom'] = 'cloakroom',
4 | ['citizen_wear'] = 'civilian clothes',
5 | ['barman_outfit'] = 'bartender outfit',
6 | ['dancer_outfit_1'] = 'dance outfit 1',
7 | ['dancer_outfit_2'] = 'dance outfit 2',
8 | ['dancer_outfit_3'] = 'dance outfit 3',
9 | ['dancer_outfit_4'] = 'dance outfit 4',
10 | ['dancer_outfit_5'] = 'dance outfit 5',
11 | ['dancer_outfit_6'] = 'dance outfit 6',
12 | ['dancer_outfit_7'] = 'dance outfit 7',
13 | ['no_outfit'] = 'there\'s no uniform to fit you...',
14 | ['open_cloackroom'] = 'press ~INPUT_CONTEXT~ to change',
15 |
16 | -- Vault
17 | ['get_weapon'] = 'get weapon',
18 | ['put_weapon'] = 'put weapon',
19 | ['get_weapon_menu'] = 'safe - Take weapon',
20 | ['put_weapon_menu'] = 'safe - Deposit weapon',
21 | ['get_object'] = 'get object',
22 | ['put_object'] = 'put Object',
23 | ['vault'] = 'safe',
24 | ['open_vault'] = 'press ~INPUT_CONTEXT~ to access the safe',
25 |
26 | -- Fridge
27 | ['get_object'] = 'get object',
28 | ['put_object'] = 'put object',
29 | ['fridge'] = 'fridge',
30 | ['open_fridge'] = 'press ~INPUT_CONTEXT~ to access the fridge',
31 | ['unicorn_fridge_stock'] = 'fridge of the Vanilla Unicorn',
32 | ['fridge_inventory'] = 'content of the fridge',
33 |
34 | -- Shops
35 | ['shop'] = 'vanilla Unicorn Shop',
36 | ['shop_menu'] = 'press ~INPUT_CONTEXT~ to access the shop.',
37 | ['bought'] = 'you bought ~b~ 1x',
38 | ['not_enough_money'] = 'you do not have enough money.',
39 | ['max_item'] = 'you\'re already carrying enough on yourself.',
40 |
41 | -- Vehicles
42 | ['vehicle_menu'] = 'vehicle',
43 | ['vehicle_out'] = 'there is already a vehicle outside',
44 | ['vehicle_spawner'] = 'press ~INPUT_CONTEXT~ to exit a vehicle',
45 | ['store_vehicle'] = 'press ~INPUT_CONTEXT~ to store the vehicle',
46 | ['service_max'] = 'full service: ',
47 | ['spawn_point_busy'] = 'a vehicle is near the exit point',
48 |
49 | -- Boss Menu
50 | ['take_company_money'] = 'remove money company',
51 | ['deposit_money'] = 'deposit money',
52 | ['amount_of_withdrawal'] = 'amount of withdrawal',
53 | ['invalid_amount'] = 'invalid amount',
54 | ['amount_of_deposit'] = 'deposit amount',
55 | ['open_bossmenu'] = 'press ~INPUT_CONTEXT~ to open the menu',
56 | ['invalid_quantity'] = 'invalid quantity',
57 | ['you_removed'] = 'you have removed x',
58 | ['you_added'] = 'you added x',
59 | ['quantity'] = 'amount',
60 | ['inventory'] = 'inventory',
61 | ['unicorn_stock'] = 'stock of Vanilla Unicorn',
62 |
63 | -- Billing Menu
64 | ['billing'] = 'bill',
65 | ['no_players_nearby'] = 'no players nearby',
66 | ['billing_amount'] = 'invoice amount',
67 | ['amount_invalid'] = 'invalid amount',
68 |
69 | -- Crafting Menu
70 | ['crafting'] = 'mixology',
71 | ['martini'] = 'white Martini',
72 | ['icetea'] = 'ice Tea',
73 | ['drpepper'] = 'dr. Pepper',
74 | ['saucisson'] = 'sausage',
75 | ['grapperaisin'] = 'bunch of grapes',
76 | ['energy'] = 'energy Drink',
77 | ['jager'] = 'jägermeister',
78 | ['limonade'] = 'lemonade',
79 | ['vodka'] = 'vodka',
80 | ['ice'] = 'ice',
81 | ['soda'] = 'soda',
82 | ['whisky'] = 'whisky',
83 | ['rhum'] = 'rhum',
84 | ['tequila'] = 'tequila',
85 | ['menthe'] = 'mint',
86 | ['jusfruit'] = 'fruit juice',
87 | ['jagerbomb'] = 'jägerbomb',
88 | ['bolcacahuetes'] = 'peanuts',
89 | ['bolnoixcajou'] = 'cashew nuts',
90 | ['bolpistache'] = 'pistachios',
91 | ['bolchips'] = 'crisps',
92 | ['golem'] = 'golem',
93 | ['whiskycoca'] = 'Whisky-coke',
94 | ['vodkaenergy'] = 'vodka-energy',
95 | ['vodkafruit'] = 'vodka-fruit juice',
96 | ['rhumfruit'] = 'rum-fruit juice',
97 | ['teqpaf'] = 'teq\'paf',
98 | ['rhumcoca'] = 'rhum-coke',
99 | ['mojito'] = 'mojito',
100 | ['mixapero'] = 'aperitif Mix',
101 | ['metreshooter'] = 'shooter meter',
102 | ['jagercerbere'] = 'jäger Cerberus',
103 | ['assembling_cocktail'] = 'mix of different ingredients in progress!',
104 | ['craft_miss'] = 'unhappy failure of the mixture ...',
105 | ['not_enough'] = 'not enough ~r~ ',
106 | ['craft'] = 'complete mixing of ~g~',
107 |
108 | -- Misc
109 | ['map_blip'] = 'vanilla Unicorn',
110 | ['unicorn'] = 'vanilla Unicorn',
111 |
112 | -- Phone
113 | ['unicorn_phone'] = 'unicorn',
114 | ['unicorn_customer'] = 'citizen',
115 |
116 | -- Teleporters
117 | ['e_to_enter_1'] = 'press ~INPUT_PICKUP~ to go behind the bar',
118 | ['e_to_exit_1'] = 'press ~INPUT_PICKUP~ to go in front off the bar',
119 | ['e_to_enter_2'] = 'press ~INPUT_PICKUP~ to go up to the roof.',
120 | ['e_to_exit_2'] = 'press ~INPUT_PICKUP~ to go down to the offices.',
121 | }
122 |
--------------------------------------------------------------------------------
/locales/cs.lua:
--------------------------------------------------------------------------------
1 | Locales['cs'] = {
2 | -- Cloakroom
3 | ['cloakroom'] = 'satna',
4 | ['citizen_wear'] = 'civilni obleceni',
5 | ['barman_outfit'] = 'barmanske obleceni',
6 | ['dancer_outfit_1'] = 'tanecni outfit 1',
7 | ['dancer_outfit_2'] = 'tanecni outfit 2',
8 | ['dancer_outfit_3'] = 'tanecni outfit 3',
9 | ['dancer_outfit_4'] = 'tanecni outfit 4',
10 | ['dancer_outfit_5'] = 'tanecni outfit 5',
11 | ['dancer_outfit_6'] = 'tanecni outfit 6',
12 | ['dancer_outfit_7'] = 'tanecni outfit 7',
13 | ['no_outfit'] = 'neni zde zadna uniforma, co by ti sedela...',
14 | ['open_cloackroom'] = 'stiskni ~INPUT_CONTEXT~ pro zmenu',
15 |
16 | -- Vault
17 | ['get_weapon'] = 'vzit zbran',
18 | ['put_weapon'] = 'vlozit zbran',
19 | ['get_weapon_menu'] = 'trezor - vzit zbran',
20 | ['put_weapon_menu'] = 'trezor - vlozit zbran',
21 | ['get_object'] = 'vzit objekt',
22 | ['put_object'] = 'vlozit objekt',
23 | ['vault'] = 'trezor',
24 | ['open_vault'] = 'stiskni ~INPUT_CONTEXT~ pro pristup do Safu',
25 |
26 | -- Fridge
27 | ['get_object'] = 'vzit objekt',
28 | ['put_object'] = 'vlozit objekt',
29 | ['fridge'] = 'lednicka',
30 | ['open_fridge'] = 'stiskni ~INPUT_CONTEXT~ pro pristup do lednicky',
31 | ['unicorn_fridge_stock'] = 'lednicka',
32 | ['fridge_inventory'] = 'obsah lednice',
33 | ['quantity_invalid'] = 'neplatne mnozstvi',
34 |
35 | -- Shops
36 | ['shop'] = 'vanilla Unicorn Obchod',
37 | ['shop_menu'] = 'stiskni ~INPUT_CONTEXT~ pro pristup do shop.',
38 | ['bought'] = 'koupil jsi ~b~ 1x',
39 | ['not_enough_money'] = 'nemas dostatek penez.',
40 | ['max_item'] = 'jiz toho neses dostatek.',
41 |
42 | -- Vehicles
43 | ['vehicle_menu'] = 'vozidlo',
44 | ['vehicle_out'] = 'vozidlo je jiz venku',
45 | ['vehicle_spawner'] = 'stiskni ~INPUT_CONTEXT~ pro opusteni vozidla',
46 | ['store_vehicle'] = 'stiskni ~INPUT_CONTEXT~ pro schovani vozidla ',
47 | ['service_max'] = 'plny service: ',
48 | ['spawn_point_busy'] = 'vozidlo je blizko exit pointu',
49 |
50 | -- Boss Menu
51 | ['take_company_money'] = 'vyber penez z frakce',
52 | ['deposit_money'] = 'vlozit penize',
53 | ['amount_of_withdrawal'] = 'vyse vyberu',
54 | ['invalid_amount'] = 'nespravne cislo',
55 | ['amount_of_deposit'] = 'vlozit mnozstvi',
56 | ['open_bossmenu'] = 'stiskni ~INPUT_CONTEXT~ pro otevreni menu',
57 | ['invalid_quantity'] = 'neplatne mnozstvi',
58 | ['you_removed'] = 'odebral jsi x',
59 | ['you_added'] = 'vlozil jsi x',
60 | ['quantity'] = 'mnozstvi',
61 | ['inventory'] = 'inventar',
62 | ['unicorn_stock'] = 'trezor',
63 |
64 | -- Billing Menu
65 | ['billing'] = 'faktura',
66 | ['no_players_nearby'] = 'zadny hrac neni pobliz',
67 | ['billing_amount'] = 'castka faktury',
68 | ['amount_invalid'] = 'nespravne mnozstvi ',
69 |
70 | -- Crafting Menu
71 | ['crafting'] = 'michani',
72 | ['martini'] = 'bile Martini',
73 | ['icetea'] = 'ledovy caj',
74 | ['drpepper'] = 'dr. Pepper',
75 | ['saucisson'] = 'klobasa',
76 | ['grapperaisin'] = 'hrozny',
77 | ['energy'] = 'energetak',
78 | ['jager'] = 'jägermeister',
79 | ['limonade'] = 'limonada',
80 | ['vodka'] = 'Vodka',
81 | ['ice'] = 'led',
82 | ['soda'] = 'soda',
83 | ['whisky'] = 'whisky',
84 | ['rhum'] = 'rum',
85 | ['tequila'] = 'tequila',
86 | ['menthe'] = 'mata',
87 | ['jusfruit'] = 'dzus',
88 | ['jagerbomb'] = 'jägerbomb',
89 | ['bolcacahuetes'] = 'orisky',
90 | ['bolnoixcajou'] = 'kesu orisky',
91 | ['bolpistache'] = 'pistacie',
92 | ['bolchips'] = 'bramburky',
93 | ['golem'] = 'golem',
94 | ['whiskycoca'] = 'whisky s kolou',
95 | ['vodkaenergy'] = 'vodka s energakem',
96 | ['vodkafruit'] = 'vodka s dzusem',
97 | ['rhumfruit'] = 'rum s dzusem',
98 | ['teqpaf'] = 'teq\'paf',
99 | ['rhumcoca'] = 'rum s kolou',
100 | ['mojito'] = 'mojito',
101 | ['mixapero'] = 'aperitif Mix',
102 | ['metreshooter'] = 'shooter meter',
103 | ['jagercerbere'] = 'jäger Cerberus',
104 | ['assembling_cocktail'] = 'smes ruzných ingrediencíi probiha!',
105 | ['craft_miss'] = 'nestastne selhani smesi ...',
106 | ['not_enough'] = 'nedostatek ~r~ ',
107 | ['craft'] = 'kompletni michani ~g~',
108 |
109 | -- Misc
110 | ['map_blip'] = 'vanilla Unicorn',
111 | ['unicorn'] = 'vanilla Unicorn',
112 |
113 | -- Phone
114 | ['unicorn_phone'] = 'unicorn',
115 | ['unicorn_customer'] = 'obcan',
116 |
117 | -- Teleporters
118 | ['e_to_enter_1'] = 'stiskni ~INPUT_PICKUP~ aby jsi se dostal za bar',
119 | ['e_to_exit_1'] = 'stiskni ~INPUT_PICKUP~ aby jsi vysel z baru',
120 | ['e_to_enter_2'] = 'stiskni ~INPUT_PICKUP~ aby jsi se dostal na strechu.',
121 | ['e_to_exit_2'] = 'stiskni ~INPUT_PICKUP~ aby jsi se dostal do office.',
122 | }
123 |
--------------------------------------------------------------------------------
/locales/sv.lua:
--------------------------------------------------------------------------------
1 | Locales['sv'] = {
2 | -- Cloakroom
3 | ['cloakroom'] = 'Garderob',
4 | ['citizen_wear'] = 'Civil kläder',
5 | ['barman_outfit'] = 'Bartender utstyrsel',
6 | ['dancer_outfit_1'] = 'Dans utstyrsel 1',
7 | ['dancer_outfit_2'] = 'Dans utstyrsel 2',
8 | ['dancer_outfit_3'] = 'Dans utstyrsel 3',
9 | ['dancer_outfit_4'] = 'Dans utstyrsel 4',
10 | ['dancer_outfit_5'] = 'Dans utstyrsel 5',
11 | ['dancer_outfit_6'] = 'Dans utstyrsel 6',
12 | ['dancer_outfit_7'] = 'Dans utstyrsel 7',
13 | ['no_outfit'] = 'Det finns ingen utstyrsel som passar dig...',
14 | ['open_cloackroom'] = 'Tryck ~INPUT_CONTEXT~ för att byta om',
15 |
16 | -- Vault
17 | ['get_weapon'] = 'Få vapen',
18 | ['put_weapon'] = 'Lägg in vapen',
19 | ['get_weapon_menu'] = 'Kassaskåp - Ta vapen',
20 | ['put_weapon_menu'] = 'Kassaskåp - Deponera vapen',
21 | ['get_object'] = 'Få objekt',
22 | ['put_object'] = 'Lägg in objekt',
23 | ['vault'] = 'Kassaskåp',
24 | ['open_vault'] = 'Tryck ~INPUT_CONTEXT~ för att öppna kassaskåpet',
25 |
26 | -- Fridge
27 | ['get_object'] = 'Få objekt',
28 | ['put_object'] = 'Lägg in objekt',
29 | ['fridge'] = 'Kylskåp',
30 | ['open_fridge'] = 'Tryck ~INPUT_CONTEXT~ för att öppna kylen',
31 | ['unicorn_fridge_stock'] = 'Fridge of the Vanilla Unicorn',
32 | ['fridge_inventory'] = 'Innehållet i kylskåpet',
33 |
34 | -- Shops
35 | ['shop'] = 'Vanilla Unicorn Shop',
36 | ['shop_menu'] = 'Tryck ~INPUT_CONTEXT~ för att öppna affären.',
37 | ['bought'] = 'Du köpte ~b~ 1x',
38 | ['not_enough_money'] = 'Du har inte tillräckligt med pengar.',
39 | ['max_item'] = 'Du har redan tillräckligt med saker.',
40 |
41 | -- Vehicles
42 | ['vehicle_menu'] = 'Fordon',
43 | ['vehicle_out'] = 'Det finns redan ett fordon utanför',
44 | ['vehicle_spawner'] = 'Tryck ~INPUT_CONTEXT~ för att ta ut fordon',
45 | ['store_vehicle'] = 'Tryck ~INPUT_CONTEXT~ för att parkera fordon',
46 | ['service_max'] = 'Full service: ',
47 | ['spawn_point_busy'] = 'Ett fordon ligger nära utgångspunkten',
48 |
49 | -- Boss Menu
50 | ['take_company_money'] = 'Ta bort företags pengar',
51 | ['deposit_money'] = 'Sätt in',
52 | ['amount_of_withdrawal'] = 'Antal uttag',
53 | ['invalid_amount'] = 'Ogiltigt belopp',
54 | ['amount_of_deposit'] = 'Insättning belopp',
55 | ['open_bossmenu'] = 'Tryck ~INPUT_CONTEXT~ för att öppna menyn',
56 | ['invalid_quantity'] = 'Ogiltigt mängd',
57 | ['you_removed'] = 'Du har tagit bort x',
58 | ['you_added'] = 'Du la till x',
59 | ['quantity'] = 'Mängd',
60 | ['inventory'] = 'Lager',
61 | ['unicorn_stock'] = 'Fond av Vanilla Unicorn',
62 |
63 | -- Billing Menu
64 | ['billing'] = 'Fakturering',
65 | ['no_players_nearby'] = 'Inga spelare nära',
66 | ['billing_amount'] = 'Fakturabelopp',
67 | ['amount_invalid'] = 'Ogiltigt belopp',
68 |
69 | -- Crafting Menu
70 | ['crafting'] = 'Mixology',
71 | ['martini'] = 'White Martini',
72 | ['icetea'] = 'Ice Tea',
73 | ['drpepper'] = 'Dr. Pepper',
74 | ['saucisson'] = 'Sausage',
75 | ['grapperaisin'] = 'Bunch of grapes',
76 | ['energy'] = 'Energy Drink',
77 | ['jager'] = 'Jägermeister',
78 | ['limonade'] = 'Lemonade',
79 | ['vodka'] = 'Vodka',
80 | ['ice'] = 'Ice',
81 | ['soda'] = 'Soda',
82 | ['whisky'] = 'Whisky',
83 | ['rhum'] = 'Rhum',
84 | ['tequila'] = 'Tequila',
85 | ['menthe'] = 'Mint',
86 | ['jusfruit'] = 'Fruit juice',
87 | ['jagerbomb'] = 'Jägerbomb',
88 | ['bolcacahuetes'] = 'Peanuts',
89 | ['bolnoixcajou'] = 'Cashew nuts',
90 | ['bolpistache'] = 'Pistachios',
91 | ['bolchips'] = 'Crisps',
92 | ['jagerbomb'] = 'Jägerbomb',
93 | ['golem'] = 'Golem',
94 | ['whiskycoca'] = 'Whisky-coke',
95 | ['vodkaenergy'] = 'Vodka-energy',
96 | ['vodkafruit'] = 'Vodka-fruit juice',
97 | ['rhumfruit'] = 'Rum-fruit juice',
98 | ['teqpaf'] = 'Teq\'paf',
99 | ['rhumcoca'] = 'Rhum-coke',
100 | ['mojito'] = 'Mojito',
101 | ['mixapero'] = 'Aperitif Mix',
102 | ['metreshooter'] = 'Shooter meter',
103 | ['jagercerbere'] = 'Jäger Cerberus',
104 | ['assembling_cocktail'] = 'Mix of different ingredients in progress!',
105 | ['craft_miss'] = 'Unhappy failure of the mixture ...',
106 | ['not_enough'] = 'Not enough ~r~ ',
107 | ['craft'] = 'Complete mixing of ~g~',
108 |
109 | -- Misc
110 | ['map_blip'] = 'Vanilla Unicorn',
111 | ['unicorn'] = 'Vanilla Unicorn',
112 |
113 | -- Phone
114 | ['unicorn_phone'] = 'Unicorn',
115 | ['unicorn_customer'] = 'Citizen',
116 |
117 | -- Teleporters
118 | ['e_to_enter_1'] = 'Tryck ~INPUT_PICKUP~ för att gå bakom baren',
119 | ['e_to_exit_1'] = 'Tryck ~INPUT_PICKUP~ för att gå framför baren',
120 | ['e_to_enter_2'] = 'Tryck ~INPUT_PICKUP~ för att gå till taket.',
121 | ['e_to_exit_2'] = 'Tryck ~INPUT_PICKUP~ för att gå ner till kontoret.',
122 |
123 | }
124 |
125 |
--------------------------------------------------------------------------------
/locales/fr.lua:
--------------------------------------------------------------------------------
1 | Locales['fr'] = {
2 | -- Cloakroom
3 | ['cloakroom'] = 'Vestiaire',
4 | ['citizen_wear'] = 'Tenue civile',
5 | ['barman_outfit'] = 'Tenue de barman',
6 | ['dancer_outfit_1'] = 'Tenue de danse 1',
7 | ['dancer_outfit_2'] = 'Tenue de danse 2',
8 | ['dancer_outfit_3'] = 'Tenue de danse 3',
9 | ['dancer_outfit_4'] = 'Tenue de danse 4',
10 | ['dancer_outfit_5'] = 'Tenue de danse 5',
11 | ['dancer_outfit_6'] = 'Tenue de danse 6',
12 | ['dancer_outfit_7'] = 'Tenue de danse 7',
13 | ['no_outfit'] = 'Il n\'y a pas d\'uniforme à votre taille...',
14 | ['open_cloackroom'] = 'Appuyez sur ~INPUT_CONTEXT~ pour vous changer',
15 |
16 | -- Vault
17 | ['get_weapon'] = 'Prendre Arme',
18 | ['put_weapon'] = 'Déposer Arme',
19 | ['get_weapon_menu'] = 'Coffre - Prendre Arme',
20 | ['put_weapon_menu'] = 'Coffre - Déposer Arme',
21 | ['get_object'] = 'Prendre Objet',
22 | ['put_object'] = 'Déposer Objet',
23 | ['vault'] = 'Coffre',
24 | ['open_vault'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au coffre',
25 |
26 | -- Fridge
27 | ['get_object'] = 'Prendre Objet',
28 | ['put_object'] = 'Déposer Objet',
29 | ['fridge'] = 'Frigo',
30 | ['open_fridge'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au frigo',
31 | ['unicorn_fridge_stock'] = 'Frigo du Vanilla Unicorn',
32 | ['fridge_inventory'] = 'Contenu du frigo',
33 |
34 | -- Shops
35 | ['shop'] = 'Boutique du Vanilla Unicorn',
36 | ['shop_menu'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder à la boutique.',
37 | ['bought'] = 'Vous avez acheté ~b~1x ',
38 | ['not_enough_money'] = 'Vous n\'avez ~r~pas assez~s~ d\'argent.',
39 | ['max_item'] = 'Vous en portez déjà assez sur vous.',
40 |
41 | -- Vehicles
42 | ['vehicle_menu'] = 'Véhicule',
43 | ['vehicle_out'] = 'Il y a déja un véhicule dehors',
44 | ['vehicle_spawner'] = 'Appuyez sur ~INPUT_CONTEXT~ pour sortir un véhicule',
45 | ['store_vehicle'] = 'Appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule',
46 | ['service_max'] = 'Service complet : ',
47 | ['spawn_point_busy'] = 'Un véhicule occupe le point de sortie',
48 |
49 | -- Boss Menu
50 | ['take_company_money'] = 'Retirer argent société',
51 | ['deposit_money'] = 'Déposer argent',
52 | ['amount_of_withdrawal'] = 'Montant du retrait',
53 | ['invalid_amount'] = 'Montant invalide',
54 | ['amount_of_deposit'] = 'Montant du dépôt',
55 | ['open_bossmenu'] = 'Appuyez sur ~INPUT_CONTEXT~ pour ouvrir le menu',
56 | ['invalid_quantity'] = 'Quantité invalide',
57 | ['you_removed'] = 'Vous avez retiré x',
58 | ['you_added'] = 'Vous avez ajouté x',
59 | ['quantity'] = 'Quantité',
60 | ['inventory'] = 'Inventaire',
61 | ['unicorn_stock'] = 'Stock du Vanilla Unicorn',
62 |
63 | -- Billing Menu
64 | ['billing'] = 'Facture',
65 | ['no_players_nearby'] = 'Aucun joueur à proximité',
66 | ['billing_amount'] = 'Montant de la facture',
67 | ['amount_invalid'] = 'Montant invalide',
68 |
69 | -- Crafting Menu
70 | ['crafting'] = 'Mixologie',
71 | ['martini'] = 'Martini blanc',
72 | ['icetea'] = 'Ice Tea',
73 | ['drpepper'] = 'Dr. Pepper',
74 | ['saucisson'] = 'Saucisson',
75 | ['grapperaisin'] = 'Grappe de raisin',
76 | ['energy'] = 'Energy Drink',
77 | ['jager'] = 'Jägermeister',
78 | ['limonade'] = 'Limonade',
79 | ['vodka'] = 'Vodka',
80 | ['ice'] = 'Glaçon',
81 | ['soda'] = 'Soda',
82 | ['whisky'] = 'Whisky',
83 | ['rhum'] = 'Rhum',
84 | ['tequila'] = 'Tequila',
85 | ['menthe'] = 'Menthe',
86 | ['jusfruit'] = 'Jus de fruits',
87 | ['jagerbomb'] = 'Jägerbomb',
88 | ['bolcacahuetes'] = 'Cacahuètes',
89 | ['bolnoixcajou'] = 'Noix de cajou',
90 | ['bolpistache'] = 'Pistaches',
91 | ['bolchips'] = 'Chips',
92 | ['jagerbomb'] = 'Jägerbomb',
93 | ['golem'] = 'Golem',
94 | ['whiskycoca'] = 'Whisky-coca',
95 | ['vodkaenergy'] = 'Vodka-energy',
96 | ['vodkafruit'] = 'Vodka-jus de fruits',
97 | ['rhumfruit'] = 'Rhum-jus de fruits',
98 | ['teqpaf'] = 'Teq\'paf',
99 | ['rhumcoca'] = 'Rhum-coca',
100 | ['mojito'] = 'Mojito',
101 | ['mixapero'] = 'Mix Apéro',
102 | ['metreshooter'] = 'Mètre de shooter',
103 | ['jagercerbere'] = 'Jäger Cerbère',
104 | ['assembling_cocktail'] = 'Mélange des différents ingrédients en cours !',
105 | ['craft_miss'] = 'Malheureux échec du mélange...',
106 | ['not_enough'] = 'Pas assez de ~r~ ',
107 | ['craft'] = 'Mélange terminé de ~g~',
108 |
109 | -- Misc
110 | ['map_blip'] = 'Vanilla Unicorn',
111 | ['unicorn'] = 'Vanilla Unicorn',
112 |
113 | -- Phone
114 | ['unicorn_phone'] = 'Unicorn',
115 | ['unicorn_customer'] = 'Citoyen',
116 |
117 | -- Teleporters
118 | ['e_to_enter_1'] = 'Appuyez sur ~INPUT_PICKUP~ pour passer derrière le bar',
119 | ['e_to_exit_1'] = 'Appuyez sur ~INPUT_PICKUP~ pour passer devant le bar.',
120 | ['e_to_enter_2'] = 'Appuyez sur ~INPUT_PICKUP~ pour monter sur le toit.',
121 | ['e_to_exit_2'] = 'Appuyez sur ~INPUT_PICKUP~ pour descendre dans les bureaux.',
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/config.lua:
--------------------------------------------------------------------------------
1 | Config = {}
2 | Config.DrawDistance = 100.0
3 |
4 | Config.EnablePlayerManagement = true
5 | Config.EnableSocietyOwnedVehicles = false
6 | Config.EnableVaultManagement = true
7 | Config.EnableHelicopters = false
8 | Config.EnableMoneyWash = true
9 | Config.MaxInService = -1
10 | Config.Locale = 'fr'
11 |
12 | Config.MissCraft = 10 -- %
13 |
14 | Config.AuthorizedVehicles = {
15 | { name = 'rentalbus', label = 'Vanilla Unicorn Bus' },
16 | }
17 |
18 | Config.Blips = {
19 | Blip = {
20 | Pos = { x = 129.246, y = -1299.363, z = 29.501 },
21 | Sprite = 121,
22 | Display = 4,
23 | Scale = 1.2,
24 | Colour = 27,
25 | },
26 | }
27 |
28 | Config.Zones = {
29 | Cloakrooms = {
30 | Pos = { x = 105.111, y = -1303.221, z = 27.788 },
31 | Size = { x = 1.5, y = 1.5, z = 1.0 },
32 | Color = { r = 255, g = 187, b = 255 },
33 | Type = 27,
34 | },
35 |
36 | Vaults = {
37 | Pos = { x = 93.406, y = -1291.753, z = 28.288 },
38 | Size = { x = 1.3, y = 1.3, z = 1.0 },
39 | Color = { r = 30, g = 144, b = 255 },
40 | Type = 23,
41 | },
42 |
43 | Fridge = {
44 | Pos = { x = 135.478, y = -1288.615, z = 28.289 },
45 | Size = { x = 1.6, y = 1.6, z = 1.0 },
46 | Color = { r = 248, g = 248, b = 255 },
47 | Type = 23,
48 | },
49 |
50 | Vehicles = {
51 | Pos = { x = 137.177, y = -1278.757, z = 28.371 },
52 | SpawnPoint = { x = 138.436, y = -1263.095, z = 28.626 },
53 | Size = { x = 1.8, y = 1.8, z = 1.0 },
54 | Color = { r = 255, g = 255, b = 0 },
55 | Type = 23,
56 | Heading = 207.43,
57 | },
58 |
59 | VehicleDeleters = {
60 | Pos = { x = 133.203, y = -1265.573, z = 28.396 },
61 | Size = { x = 3.0, y = 3.0, z = 0.2 },
62 | Color = { r = 255, g = 255, b = 0 },
63 | Type = 1,
64 | },
65 |
66 | --[[
67 | Helicopters = {
68 | Pos = { x = 137.177, y = -1278.757, z = 28.371 },
69 | SpawnPoint = { x = 138.436, y = -1263.095, z = 28.626 },
70 | Size = { x = 1.8, y = 1.8, z = 1.0 },
71 | Color = { r = 255, g = 255, b = 0 },
72 | Type = 23,
73 | Heading = 207.43,
74 | },
75 |
76 | HelicopterDeleters = {
77 | Pos = { x = 133.203, y = -1265.573, z = 28.396 },
78 | Size = { x = 3.0, y = 3.0, z = 0.2 },
79 | Color = { r = 255, g = 255, b = 0 },
80 | Type = 1,
81 | },
82 | ]]--
83 |
84 | BossActions = {
85 | Pos = { x = 94.951, y = -1294.021, z = 28.268 },
86 | Size = { x = 1.5, y = 1.5, z = 1.0 },
87 | Color = { r = 0, g = 100, b = 0 },
88 | Type = 1,
89 | },
90 |
91 | -----------------------
92 | -------- SHOPS --------
93 | Flacons = {
94 | Pos = { x = -2955.242, y = 385.897, z = 14.041 },
95 | Size = { x = 1.6, y = 1.6, z = 1.0 },
96 | Color = { r = 238, g = 0, b = 0 },
97 | Type = 23,
98 | Items = {
99 | { name = 'jager', label = _U('jager'), price = 3 },
100 | { name = 'vodka', label = _U('vodka'), price = 4 },
101 | { name = 'rhum', label = _U('rhum'), price = 2 },
102 | { name = 'whisky', label = _U('whisky'), price = 7 },
103 | { name = 'tequila', label = _U('tequila'), price = 2 },
104 | { name = 'martini', label = _U('martini'), price = 5 }
105 | },
106 | },
107 |
108 | NoAlcool = {
109 | Pos = { x = 178.028, y = 307.467, z = 104.392 },
110 | Size = { x = 1.6, y = 1.6, z = 1.0 },
111 | Color = { r = 238, g = 110, b = 0 },
112 | Type = 23,
113 | Items = {
114 | { name = 'soda', label = _U('soda'), price = 4 },
115 | { name = 'jusfruit', label = _U('jusfruit'), price = 3 },
116 | { name = 'icetea', label = _U('icetea'), price = 4 },
117 | { name = 'energy', label = _U('energy'), price = 7 },
118 | { name = 'drpepper', label = _U('drpepper'), price = 2 },
119 | { name = 'limonade', label = _U('limonade'), price = 1 }
120 | },
121 | },
122 |
123 | Apero = {
124 | Pos = { x = 98.675, y = -1809.498, z = 26.095 },
125 | Size = { x = 1.6, y = 1.6, z = 1.0 },
126 | Color = { r = 142, g = 125, b = 76 },
127 | Type = 23,
128 | Items = {
129 | { name = 'bolcacahuetes', label = _U('bolcacahuetes'), price = 7 },
130 | { name = 'bolnoixcajou', label = _U('bolnoixcajou'), price = 10 },
131 | { name = 'bolpistache', label = _U('bolpistache'), price = 15 },
132 | { name = 'bolchips', label = _U('bolchips'), price = 5 },
133 | { name = 'saucisson', label = _U('saucisson'), price = 25 },
134 | { name = 'grapperaisin', label = _U('grapperaisin'), price = 15 }
135 | },
136 | },
137 |
138 | Ice = {
139 | Pos = { x = 26.979, y = -1343.457, z = 28.517 },
140 | Size = { x = 1.6, y = 1.6, z = 1.0 },
141 | Color = { r = 255, g = 255, b = 255 },
142 | Type = 23,
143 | Items = {
144 | { name = 'ice', label = _U('ice'), price = 1 },
145 | { name = 'menthe', label = _U('menthe'), price = 2 }
146 | },
147 | },
148 | }
149 |
150 | -----------------------
151 | ----- TELEPORTERS -----
152 | Config.TeleportZones = {
153 | EnterBuilding = {
154 | Pos = { x = 132.608, y = -1293.978, z = 28.269 },
155 | Size = { x = 1.2, y = 1.2, z = 0.1 },
156 | Color = { r = 128, g = 128, b = 128 },
157 | Marker = 1,
158 | Hint = _U('e_to_enter_1'),
159 | Teleport = { x = 126.742, y = -1278.386, z = 28.569 }
160 | },
161 |
162 | ExitBuilding = {
163 | Pos = { x = 132.517, y = -1290.901, z = 28.269 },
164 | Size = { x = 1.2, y = 1.2, z = 0.1 },
165 | Color = { r = 128, g = 128, b = 128 },
166 | Marker = 1,
167 | Hint = _U('e_to_exit_1'),
168 | Teleport = { x = 131.175, y = -1295.598, z = 28.569 },
169 | },
170 |
171 | --[[
172 | EnterHeliport = {
173 | Pos = { x = 126.843, y = -729.012, z = 241.201 },
174 | Size = { x = 2.0, y = 2.0, z = 0.2 },
175 | Color = { r = 204, g = 204, b = 0 },
176 | Marker = 1,
177 | Hint = _U('e_to_enter_2),
178 | Teleport = { x = -65.944, y = -818.589, z = 320.801 }
179 | },
180 |
181 | ExitHeliport = {
182 | Pos = { x = -67.236, y = -821.702, z = 320.401 },
183 | Size = { x = 2.0, y = 2.0, z = 0.2 },
184 | Color = { r = 204, g = 204, b = 0 },
185 | Marker = 1,
186 | Hint = _U('e_to_exit_2'),
187 | Teleport = { x = 124.164, y = -728.231, z = 241.801 },
188 | },
189 | ]]--
190 | }
191 |
192 | -- CHECK SKINCHANGER CLIENT MAIN.LUA for matching elements
193 | Config.Uniforms = {
194 | barman_outfit = {
195 | male = {
196 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
197 | ['torso_1'] = 40, ['torso_2'] = 0,
198 | ['decals_1'] = 0, ['decals_2'] = 0,
199 | ['arms'] = 40,
200 | ['pants_1'] = 28, ['pants_2'] = 2,
201 | ['shoes_1'] = 38, ['shoes_2'] = 4,
202 | ['chain_1'] = 118, ['chain_2'] = 0
203 | },
204 | female = {
205 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
206 | ['torso_1'] = 8, ['torso_2'] = 2,
207 | ['decals_1'] = 0, ['decals_2'] = 0,
208 | ['arms'] = 5,
209 | ['pants_1'] = 44, ['pants_2'] = 4,
210 | ['shoes_1'] = 0, ['shoes_2'] = 0,
211 | ['chain_1'] = 0, ['chain_2'] = 2
212 | }},
213 | dancer_outfit_1 = {
214 | male = {
215 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
216 | ['torso_1'] = 15, ['torso_2'] = 0,
217 | ['decals_1'] = 0, ['decals_2'] = 0,
218 | ['arms'] = 40,
219 | ['pants_1'] = 61, ['pants_2'] = 9,
220 | ['shoes_1'] = 16, ['shoes_2'] = 9,
221 | ['chain_1'] = 118, ['chain_2'] = 0
222 | },
223 | female = {
224 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
225 | ['torso_1'] = 22, ['torso_2'] = 0,
226 | ['decals_1'] = 0, ['decals_2'] = 0,
227 | ['arms'] = 4,
228 | ['pants_1'] = 22, ['pants_2'] = 0,
229 | ['shoes_1'] = 18, ['shoes_2'] = 0,
230 | ['chain_1'] = 61, ['chain_2'] = 1
231 | }},
232 | dancer_outfit_2 = {
233 | male = {
234 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
235 | ['torso_1'] = 62, ['torso_2'] = 0,
236 | ['decals_1'] = 0, ['decals_2'] = 0,
237 | ['arms'] = 14,
238 | ['pants_1'] = 4, ['pants_2'] = 0,
239 | ['shoes_1'] = 34, ['shoes_2'] = 0,
240 | ['chain_1'] = 118, ['chain_2'] = 0
241 | },
242 | female = {
243 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
244 | ['torso_1'] = 22, ['torso_2'] = 2,
245 | ['decals_1'] = 0, ['decals_2'] = 0,
246 | ['arms'] = 4,
247 | ['pants_1'] = 20, ['pants_2'] = 2,
248 | ['shoes_1'] = 18, ['shoes_2'] = 2,
249 | ['chain_1'] = 0, ['chain_2'] = 0
250 | }},
251 | dancer_outfit_3 = {
252 | male = {
253 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
254 | ['torso_1'] = 15, ['torso_2'] = 0,
255 | ['decals_1'] = 0, ['decals_2'] = 0,
256 | ['arms'] = 15,
257 | ['pants_1'] = 4, ['pants_2'] = 0,
258 | ['shoes_1'] = 34, ['shoes_2'] = 0,
259 | ['chain_1'] = 118, ['chain_2'] = 0
260 | },
261 | female = {
262 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
263 | ['torso_1'] = 22, ['torso_2'] = 1,
264 | ['decals_1'] = 0, ['decals_2'] = 0,
265 | ['arms'] = 15,
266 | ['pants_1'] = 19, ['pants_2'] = 1,
267 | ['shoes_1'] = 19, ['shoes_2'] = 3,
268 | ['chain_1'] = 0, ['chain_2'] = 0
269 | }},
270 | dancer_outfit_4 = {
271 | male = {
272 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
273 | ['torso_1'] = 15, ['torso_2'] = 0,
274 | ['decals_1'] = 0, ['decals_2'] = 0,
275 | ['arms'] = 15,
276 | ['pants_1'] = 61, ['pants_2'] = 5,
277 | ['shoes_1'] = 34, ['shoes_2'] = 0,
278 | ['chain_1'] = 118, ['chain_2'] = 0
279 | },
280 | female = {
281 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
282 | ['torso_1'] = 82, ['torso_2'] = 0,
283 | ['decals_1'] = 0, ['decals_2'] = 0,
284 | ['arms'] = 15,
285 | ['pants_1'] = 63, ['pants_2'] = 11,
286 | ['shoes_1'] = 41, ['shoes_2'] = 11,
287 | ['chain_1'] = 0, ['chain_2'] = 0
288 | }},
289 | dancer_outfit_5 = {
290 | male = {
291 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
292 | ['torso_1'] = 15, ['torso_2'] = 0,
293 | ['decals_1'] = 0, ['decals_2'] = 0,
294 | ['arms'] = 15,
295 | ['pants_1'] = 21, ['pants_2'] = 0,
296 | ['shoes_1'] = 34, ['shoes_2'] = 0,
297 | ['chain_1'] = 118, ['chain_2'] = 0
298 | },
299 | female = {
300 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
301 | ['torso_1'] = 15, ['torso_2'] = 5,
302 | ['decals_1'] = 0, ['decals_2'] = 0,
303 | ['arms'] = 15,
304 | ['pants_1'] = 63, ['pants_2'] = 2,
305 | ['shoes_1'] = 41, ['shoes_2'] = 2,
306 | ['chain_1'] = 0, ['chain_2'] = 0
307 | }},
308 | dancer_outfit_6 = {
309 | male = {
310 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
311 | ['torso_1'] = 15, ['torso_2'] = 0,
312 | ['decals_1'] = 0, ['decals_2'] = 0,
313 | ['arms'] = 15,
314 | ['pants_1'] = 81, ['pants_2'] = 0,
315 | ['shoes_1'] = 34, ['shoes_2'] = 0,
316 | ['chain_1'] = 118, ['chain_2'] = 0
317 | },
318 | female = {
319 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
320 | ['torso_1'] = 18, ['torso_2'] = 3,
321 | ['decals_1'] = 0, ['decals_2'] = 0,
322 | ['arms'] = 15,
323 | ['pants_1'] = 63, ['pants_2'] = 10,
324 | ['shoes_1'] = 41, ['shoes_2'] = 10,
325 | ['chain_1'] = 0, ['chain_2'] = 0
326 | }},
327 | dancer_outfit_7 = {
328 | male = {
329 | ['tshirt_1'] = 15, ['tshirt_2'] = 0,
330 | ['torso_1'] = 15, ['torso_2'] = 0,
331 | ['decals_1'] = 0, ['decals_2'] = 0,
332 | ['arms'] = 40,
333 | ['pants_1'] = 61, ['pants_2'] = 9,
334 | ['shoes_1'] = 16, ['shoes_2'] = 9,
335 | ['chain_1'] = 118, ['chain_2'] = 0
336 | },
337 | female = {
338 | ['tshirt_1'] = 3, ['tshirt_2'] = 0,
339 | ['torso_1'] = 111, ['torso_2'] = 6,
340 | ['decals_1'] = 0, ['decals_2'] = 0,
341 | ['arms'] = 15,
342 | ['pants_1'] = 63, ['pants_2'] = 6,
343 | ['shoes_1'] = 41, ['shoes_2'] = 6,
344 | ['chain_1'] = 0, ['chain_2'] = 0
345 | }}
346 | }
347 |
--------------------------------------------------------------------------------
/server/main.lua:
--------------------------------------------------------------------------------
1 | ESX = nil
2 |
3 | TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
4 |
5 | if Config.MaxInService ~= -1 then
6 | TriggerEvent('esx_service:activateService', 'unicorn', Config.MaxInService)
7 | end
8 |
9 | TriggerEvent('esx_phone:registerNumber', 'unicorn', _U('unicorn_customer'), true, true)
10 | TriggerEvent('esx_society:registerSociety', 'unicorn', 'Unicorn', 'society_unicorn', 'society_unicorn', 'society_unicorn', {type = 'private'})
11 |
12 | RegisterServerEvent('esx_unicornjob:getStockItem')
13 | AddEventHandler('esx_unicornjob:getStockItem', function(itemName, count)
14 | local _source = source
15 | local xPlayer = ESX.GetPlayerFromId(_source)
16 |
17 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn', function(inventory)
18 |
19 | local item = inventory.getItem(itemName)
20 |
21 | if item.count >= count then
22 | inventory.removeItem(itemName, count)
23 | xPlayer.addInventoryItem(itemName, count)
24 | else
25 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid'))
26 | end
27 |
28 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_removed') .. count .. ' ' .. item.label)
29 | end)
30 | end)
31 |
32 | ESX.RegisterServerCallback('esx_unicornjob:getStockItems', function(source, cb)
33 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn', function(inventory)
34 |
35 | cb(inventory.items)
36 | end)
37 | end)
38 |
39 | RegisterServerEvent('esx_unicornjob:putStockItems')
40 | AddEventHandler('esx_unicornjob:putStockItems', function(itemName, count)
41 | local _source = source
42 | local xPlayer = ESX.GetPlayerFromId(_source)
43 |
44 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn', function(inventory)
45 |
46 | local item = inventory.getItem(itemName)
47 | local playerItemCount = xPlayer.getInventoryItem(itemName).count
48 |
49 | if item.count >= 0 and count <= playerItemCount then
50 | xPlayer.removeInventoryItem(itemName, count)
51 | inventory.addItem(itemName, count)
52 | else
53 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
54 | end
55 |
56 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_added') .. count .. ' ' .. item.label)
57 | end)
58 | end)
59 |
60 | RegisterServerEvent('esx_unicornjob:getFridgeStockItem')
61 | AddEventHandler('esx_unicornjob:getFridgeStockItem', function(itemName, count)
62 | local _source = source
63 | local xPlayer = ESX.GetPlayerFromId(_source)
64 |
65 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn_fridge', function(inventory)
66 |
67 | local item = inventory.getItem(itemName)
68 |
69 | if item.count >= count then
70 | inventory.removeItem(itemName, count)
71 | xPlayer.addInventoryItem(itemName, count)
72 | else
73 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid'))
74 | end
75 |
76 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_removed') .. count .. ' ' .. item.label)
77 | end)
78 | end)
79 |
80 | ESX.RegisterServerCallback('esx_unicornjob:getFridgeStockItems', function(source, cb)
81 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn_fridge', function(inventory)
82 |
83 | cb(inventory.items)
84 | end)
85 | end)
86 |
87 | RegisterServerEvent('esx_unicornjob:putFridgeStockItems')
88 | AddEventHandler('esx_unicornjob:putFridgeStockItems', function(itemName, count)
89 | local _source = source
90 | local xPlayer = ESX.GetPlayerFromId(_source)
91 |
92 | TriggerEvent('esx_addoninventory:getSharedInventory', 'society_unicorn_fridge', function(inventory)
93 |
94 | local item = inventory.getItem(itemName)
95 | local playerItemCount = xPlayer.getInventoryItem(itemName).count
96 |
97 | if item.count >= 0 and count <= playerItemCount then
98 | xPlayer.removeInventoryItem(itemName, count)
99 | inventory.addItem(itemName, count)
100 | else
101 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
102 | end
103 |
104 | TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_added') .. count .. ' ' .. item.label)
105 | end)
106 | end)
107 |
108 | RegisterServerEvent('esx_unicornjob:buyItem')
109 | AddEventHandler('esx_unicornjob:buyItem', function(itemName, price, itemLabel)
110 | local _source = source
111 | local xPlayer = ESX.GetPlayerFromId(_source)
112 | local limit = xPlayer.getInventoryItem(itemName).limit
113 | local qtty = xPlayer.getInventoryItem(itemName).count
114 | local societyAccount = nil
115 |
116 | TriggerEvent('esx_addonaccount:getSharedAccount', 'society_unicorn', function(account)
117 | societyAccount = account
118 | end)
119 |
120 | if societyAccount ~= nil and societyAccount.money >= price then
121 | if qtty < limit then
122 | societyAccount.removeMoney(price)
123 | xPlayer.addInventoryItem(itemName, 1)
124 | TriggerClientEvent('esx:showNotification', _source, _U('bought') .. itemLabel)
125 | else
126 | TriggerClientEvent('esx:showNotification', _source, _U('max_item'))
127 | end
128 | else
129 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough'))
130 | end
131 | end)
132 |
133 |
134 | RegisterServerEvent('esx_unicornjob:craftingCoktails')
135 | AddEventHandler('esx_unicornjob:craftingCoktails', function(itemValue)
136 | local _source = source
137 | local _itemValue = itemValue
138 |
139 | TriggerClientEvent('esx:showNotification', _source, _U('assembling_cocktail'))
140 |
141 | if _itemValue == 'jagerbomb' then
142 | SetTimeout(10000, function()
143 |
144 | local xPlayer = ESX.GetPlayerFromId(_source)
145 |
146 | local alephQuantity = xPlayer.getInventoryItem('energy').count
147 | local bethQuantity = xPlayer.getInventoryItem('jager').count
148 |
149 | if alephQuantity < 2 then
150 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('energy') .. '~w~')
151 | elseif bethQuantity < 2 then
152 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('jager') .. '~w~')
153 | else
154 | local chanceToMiss = math.random(100)
155 | if chanceToMiss <= Config.MissCraft then
156 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
157 | xPlayer.removeInventoryItem('energy', 2)
158 | xPlayer.removeInventoryItem('jager', 2)
159 | else
160 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('jagerbomb') .. ' ~w~!')
161 | xPlayer.removeInventoryItem('energy', 2)
162 | xPlayer.removeInventoryItem('jager', 2)
163 | xPlayer.addInventoryItem('jagerbomb', 1)
164 | end
165 | end
166 | end)
167 | end
168 |
169 | if _itemValue == 'golem' then
170 | SetTimeout(10000, function()
171 |
172 | local xPlayer = ESX.GetPlayerFromId(_source)
173 |
174 | local alephQuantity = xPlayer.getInventoryItem('limonade').count
175 | local bethQuantity = xPlayer.getInventoryItem('vodka').count
176 | local gimelQuantity = xPlayer.getInventoryItem('ice').count
177 |
178 | if alephQuantity < 2 then
179 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('limonade') .. '~w~')
180 | elseif bethQuantity < 2 then
181 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('vodka') .. '~w~')
182 | elseif gimelQuantity < 1 then
183 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('ice') .. '~w~')
184 | else
185 | local chanceToMiss = math.random(100)
186 | if chanceToMiss <= Config.MissCraft then
187 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
188 | xPlayer.removeInventoryItem('limonade', 2)
189 | xPlayer.removeInventoryItem('vodka', 2)
190 | xPlayer.removeInventoryItem('ice', 1)
191 | else
192 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('golem') .. ' ~w~!')
193 | xPlayer.removeInventoryItem('limonade', 2)
194 | xPlayer.removeInventoryItem('vodka', 2)
195 | xPlayer.removeInventoryItem('ice', 1)
196 | xPlayer.addInventoryItem('golem', 1)
197 | end
198 | end
199 | end)
200 | end
201 |
202 | if _itemValue == 'whiskycoca' then
203 | SetTimeout(10000, function()
204 |
205 | local xPlayer = ESX.GetPlayerFromId(_source)
206 |
207 | local alephQuantity = xPlayer.getInventoryItem('soda').count
208 | local bethQuantity = xPlayer.getInventoryItem('whisky').count
209 |
210 | if alephQuantity < 2 then
211 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('soda') .. '~w~')
212 | elseif bethQuantity < 2 then
213 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('whisky') .. '~w~')
214 | else
215 | local chanceToMiss = math.random(100)
216 | if chanceToMiss <= Config.MissCraft then
217 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
218 | xPlayer.removeInventoryItem('soda', 2)
219 | xPlayer.removeInventoryItem('whisky', 2)
220 | else
221 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('whiskycoca') .. ' ~w~!')
222 | xPlayer.removeInventoryItem('soda', 2)
223 | xPlayer.removeInventoryItem('whisky', 2)
224 | xPlayer.addInventoryItem('whiskycoca', 1)
225 | end
226 | end
227 | end)
228 | end
229 |
230 | if _itemValue == 'rhumcoca' then
231 | SetTimeout(10000, function()
232 |
233 | local xPlayer = ESX.GetPlayerFromId(_source)
234 |
235 | local alephQuantity = xPlayer.getInventoryItem('soda').count
236 | local bethQuantity = xPlayer.getInventoryItem('rhum').count
237 |
238 | if alephQuantity < 2 then
239 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('soda') .. '~w~')
240 | elseif bethQuantity < 2 then
241 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('rhum') .. '~w~')
242 | else
243 | local chanceToMiss = math.random(100)
244 | if chanceToMiss <= Config.MissCraft then
245 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
246 | xPlayer.removeInventoryItem('soda', 2)
247 | xPlayer.removeInventoryItem('rhum', 2)
248 | else
249 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('rhumcoca') .. ' ~w~!')
250 | xPlayer.removeInventoryItem('soda', 2)
251 | xPlayer.removeInventoryItem('rhum', 2)
252 | xPlayer.addInventoryItem('rhumcoca', 1)
253 | end
254 | end
255 | end)
256 | end
257 |
258 | if _itemValue == 'vodkaenergy' then
259 | SetTimeout(10000, function()
260 |
261 | local xPlayer = ESX.GetPlayerFromId(_source)
262 |
263 | local alephQuantity = xPlayer.getInventoryItem('energy').count
264 | local bethQuantity = xPlayer.getInventoryItem('vodka').count
265 | local gimelQuantity = xPlayer.getInventoryItem('ice').count
266 |
267 | if alephQuantity < 2 then
268 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('energy') .. '~w~')
269 | elseif bethQuantity < 2 then
270 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('vodka') .. '~w~')
271 | elseif gimelQuantity < 1 then
272 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('ice') .. '~w~')
273 | else
274 | local chanceToMiss = math.random(100)
275 | if chanceToMiss <= Config.MissCraft then
276 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
277 | xPlayer.removeInventoryItem('energy', 2)
278 | xPlayer.removeInventoryItem('vodka', 2)
279 | xPlayer.removeInventoryItem('ice', 1)
280 | else
281 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('vodkaenergy') .. ' ~w~!')
282 | xPlayer.removeInventoryItem('energy', 2)
283 | xPlayer.removeInventoryItem('vodka', 2)
284 | xPlayer.removeInventoryItem('ice', 1)
285 | xPlayer.addInventoryItem('vodkaenergy', 1)
286 | end
287 | end
288 | end)
289 | end
290 |
291 | if _itemValue == 'vodkafruit' then
292 | SetTimeout(10000, function()
293 |
294 | local xPlayer = ESX.GetPlayerFromId(_source)
295 |
296 | local alephQuantity = xPlayer.getInventoryItem('jusfruit').count
297 | local bethQuantity = xPlayer.getInventoryItem('vodka').count
298 | local gimelQuantity = xPlayer.getInventoryItem('ice').count
299 |
300 | if alephQuantity < 2 then
301 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('jusfruit') .. '~w~')
302 | elseif bethQuantity < 2 then
303 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('vodka') .. '~w~')
304 | elseif gimelQuantity < 1 then
305 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('ice') .. '~w~')
306 | else
307 | local chanceToMiss = math.random(100)
308 | if chanceToMiss <= Config.MissCraft then
309 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
310 | xPlayer.removeInventoryItem('jusfruit', 2)
311 | xPlayer.removeInventoryItem('vodka', 2)
312 | xPlayer.removeInventoryItem('ice', 1)
313 | else
314 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('vodkafruit') .. ' ~w~!')
315 | xPlayer.removeInventoryItem('jusfruit', 2)
316 | xPlayer.removeInventoryItem('vodka', 2)
317 | xPlayer.removeInventoryItem('ice', 1)
318 | xPlayer.addInventoryItem('vodkafruit', 1)
319 | end
320 | end
321 | end)
322 | end
323 |
324 | if _itemValue == 'rhumfruit' then
325 | SetTimeout(10000, function()
326 |
327 | local xPlayer = ESX.GetPlayerFromId(_source)
328 |
329 | local alephQuantity = xPlayer.getInventoryItem('jusfruit').count
330 | local bethQuantity = xPlayer.getInventoryItem('rhum').count
331 | local gimelQuantity = xPlayer.getInventoryItem('ice').count
332 |
333 | if alephQuantity < 2 then
334 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('jusfruit') .. '~w~')
335 | elseif bethQuantity < 2 then
336 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('rhum') .. '~w~')
337 | elseif gimelQuantity < 1 then
338 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('ice') .. '~w~')
339 | else
340 | local chanceToMiss = math.random(100)
341 | if chanceToMiss <= Config.MissCraft then
342 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
343 | xPlayer.removeInventoryItem('jusfruit', 2)
344 | xPlayer.removeInventoryItem('rhum', 2)
345 | xPlayer.removeInventoryItem('ice', 1)
346 | else
347 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('rhumfruit') .. ' ~w~!')
348 | xPlayer.removeInventoryItem('jusfruit', 2)
349 | xPlayer.removeInventoryItem('rhum', 2)
350 | xPlayer.removeInventoryItem('ice', 1)
351 | xPlayer.addInventoryItem('rhumfruit', 1)
352 | end
353 | end
354 | end)
355 | end
356 |
357 | if _itemValue == 'teqpaf' then
358 | SetTimeout(10000, function()
359 |
360 | local xPlayer = ESX.GetPlayerFromId(_source)
361 |
362 | local alephQuantity = xPlayer.getInventoryItem('limonade').count
363 | local bethQuantity = xPlayer.getInventoryItem('tequila').count
364 |
365 | if alephQuantity < 2 then
366 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('limonade') .. '~w~')
367 | elseif bethQuantity < 2 then
368 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('tequila') .. '~w~')
369 | else
370 | local chanceToMiss = math.random(100)
371 | if chanceToMiss <= Config.MissCraft then
372 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
373 | xPlayer.removeInventoryItem('limonade', 2)
374 | xPlayer.removeInventoryItem('tequila', 2)
375 | else
376 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('teqpaf') .. ' ~w~!')
377 | xPlayer.removeInventoryItem('limonade', 2)
378 | xPlayer.removeInventoryItem('tequila', 2)
379 | xPlayer.addInventoryItem('teqpaf', 1)
380 | end
381 | end
382 | end)
383 | end
384 |
385 | if _itemValue == 'mojito' then
386 | SetTimeout(10000, function()
387 |
388 | local xPlayer = ESX.GetPlayerFromId(_source)
389 |
390 | local alephQuantity = xPlayer.getInventoryItem('rhum').count
391 | local bethQuantity = xPlayer.getInventoryItem('limonade').count
392 | local gimelQuantity = xPlayer.getInventoryItem('menthe').count
393 | local daletQuantity = xPlayer.getInventoryItem('ice').count
394 |
395 | if alephQuantity < 2 then
396 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('rhum') .. '~w~')
397 | elseif bethQuantity < 2 then
398 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('limonade') .. '~w~')
399 | elseif gimelQuantity < 2 then
400 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('menthe') .. '~w~')
401 | elseif daletQuantity < 1 then
402 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('ice') .. '~w~')
403 | else
404 | local chanceToMiss = math.random(100)
405 | if chanceToMiss <= Config.MissCraft then
406 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
407 | xPlayer.removeInventoryItem('rhum', 2)
408 | xPlayer.removeInventoryItem('limonade', 2)
409 | xPlayer.removeInventoryItem('menthe', 2)
410 | xPlayer.removeInventoryItem('ice', 1)
411 | else
412 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('mojito') .. ' ~w~!')
413 | xPlayer.removeInventoryItem('rhum', 2)
414 | xPlayer.removeInventoryItem('limonade', 2)
415 | xPlayer.removeInventoryItem('menthe', 2)
416 | xPlayer.removeInventoryItem('ice', 1)
417 | xPlayer.addInventoryItem('mojito', 1)
418 | end
419 | end
420 | end)
421 | end
422 |
423 | if _itemValue == 'mixapero' then
424 | SetTimeout(10000, function()
425 |
426 | local xPlayer = ESX.GetPlayerFromId(_source)
427 |
428 | local alephQuantity = xPlayer.getInventoryItem('bolcacahuetes').count
429 | local bethQuantity = xPlayer.getInventoryItem('bolnoixcajou').count
430 | local gimelQuantity = xPlayer.getInventoryItem('bolpistache').count
431 | local daletQuantity = xPlayer.getInventoryItem('bolchips').count
432 |
433 | if alephQuantity < 2 then
434 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('bolcacahuetes') .. '~w~')
435 | elseif bethQuantity < 2 then
436 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('bolnoixcajou') .. '~w~')
437 | elseif gimelQuantity < 2 then
438 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('bolpistache') .. '~w~')
439 | elseif daletQuantity < 2 then
440 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('bolchips') .. '~w~')
441 | else
442 | local chanceToMiss = math.random(100)
443 | if chanceToMiss <= Config.MissCraft then
444 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
445 | xPlayer.removeInventoryItem('bolcacahuetes', 2)
446 | xPlayer.removeInventoryItem('bolnoixcajou', 2)
447 | xPlayer.removeInventoryItem('bolpistache', 2)
448 | xPlayer.removeInventoryItem('bolchips', 1)
449 | else
450 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('mixapero') .. ' ~w~!')
451 | xPlayer.removeInventoryItem('bolcacahuetes', 2)
452 | xPlayer.removeInventoryItem('bolnoixcajou', 2)
453 | xPlayer.removeInventoryItem('bolpistache', 2)
454 | xPlayer.removeInventoryItem('bolchips', 2)
455 | xPlayer.addInventoryItem('mixapero', 1)
456 | end
457 | end
458 | end)
459 | end
460 |
461 | if _itemValue == 'metreshooter' then
462 | SetTimeout(10000, function()
463 |
464 | local xPlayer = ESX.GetPlayerFromId(_source)
465 |
466 | local alephQuantity = xPlayer.getInventoryItem('jager').count
467 | local bethQuantity = xPlayer.getInventoryItem('vodka').count
468 | local gimelQuantity = xPlayer.getInventoryItem('whisky').count
469 | local daletQuantity = xPlayer.getInventoryItem('tequila').count
470 |
471 | if alephQuantity < 2 then
472 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('jager') .. '~w~')
473 | elseif bethQuantity < 2 then
474 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('vodka') .. '~w~')
475 | elseif gimelQuantity < 2 then
476 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('whisky') .. '~w~')
477 | elseif daletQuantity < 2 then
478 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('tequila') .. '~w~')
479 | else
480 | local chanceToMiss = math.random(100)
481 | if chanceToMiss <= Config.MissCraft then
482 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
483 | xPlayer.removeInventoryItem('jager', 2)
484 | xPlayer.removeInventoryItem('vodka', 2)
485 | xPlayer.removeInventoryItem('whisky', 2)
486 | xPlayer.removeInventoryItem('tequila', 2)
487 | else
488 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('metreshooter') .. ' ~w~!')
489 | xPlayer.removeInventoryItem('jager', 2)
490 | xPlayer.removeInventoryItem('vodka', 2)
491 | xPlayer.removeInventoryItem('whisky', 2)
492 | xPlayer.removeInventoryItem('tequila', 2)
493 | xPlayer.addInventoryItem('metreshooter', 1)
494 | end
495 | end
496 | end)
497 | end
498 |
499 | if _itemValue == 'jagercerbere' then
500 | SetTimeout(10000, function()
501 |
502 | local xPlayer = ESX.GetPlayerFromId(_source)
503 |
504 | local alephQuantity = xPlayer.getInventoryItem('jagerbomb').count
505 | local bethQuantity = xPlayer.getInventoryItem('vodka').count
506 | local gimelQuantity = xPlayer.getInventoryItem('tequila').count
507 |
508 | if alephQuantity < 1 then
509 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('jagerbomb') .. '~w~')
510 | elseif bethQuantity < 2 then
511 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('vodka') .. '~w~')
512 | elseif gimelQuantity < 2 then
513 | TriggerClientEvent('esx:showNotification', _source, _U('not_enough') .. _U('tequila') .. '~w~')
514 | else
515 | local chanceToMiss = math.random(100)
516 | if chanceToMiss <= Config.MissCraft then
517 | TriggerClientEvent('esx:showNotification', _source, _U('craft_miss'))
518 | xPlayer.removeInventoryItem('jagerbomb', 1)
519 | xPlayer.removeInventoryItem('vodka', 2)
520 | xPlayer.removeInventoryItem('tequila', 2)
521 | else
522 | TriggerClientEvent('esx:showNotification', _source, _U('craft') .. _U('jagercerbere') .. ' ~w~!')
523 | xPlayer.removeInventoryItem('jagerbomb', 1)
524 | xPlayer.removeInventoryItem('vodka', 2)
525 | xPlayer.removeInventoryItem('tequila', 2)
526 | xPlayer.addInventoryItem('jagercerbere', 1)
527 | end
528 | end
529 | end)
530 | end
531 | end)
532 |
533 | ESX.RegisterServerCallback('esx_unicornjob:getVaultWeapons', function(source, cb)
534 |
535 | TriggerEvent('esx_datastore:getSharedDataStore', 'society_unicorn', function(store)
536 |
537 | local weapons = store.get('weapons')
538 |
539 | if weapons == nil then
540 | weapons = {}
541 | end
542 |
543 | cb(weapons)
544 | end)
545 | end)
546 |
547 | ESX.RegisterServerCallback('esx_unicornjob:addVaultWeapon', function(source, cb, weaponName)
548 | local _source = source
549 | local xPlayer = ESX.GetPlayerFromId(_source)
550 |
551 | xPlayer.removeWeapon(weaponName)
552 |
553 | TriggerEvent('esx_datastore:getSharedDataStore', 'society_unicorn', function(store)
554 |
555 | local weapons = store.get('weapons')
556 |
557 | if weapons == nil then
558 | weapons = {}
559 | end
560 |
561 | local foundWeapon = false
562 |
563 | for i=1, #weapons, 1 do
564 | if weapons[i].name == weaponName then
565 | weapons[i].count = weapons[i].count + 1
566 | foundWeapon = true
567 | end
568 | end
569 |
570 | if not foundWeapon then
571 | table.insert(weapons, {name = weaponName, count = 1})
572 | end
573 |
574 | store.set('weapons', weapons)
575 |
576 | cb()
577 | end)
578 | end)
579 |
580 | ESX.RegisterServerCallback('esx_unicornjob:removeVaultWeapon', function(source, cb, weaponName)
581 | local _source = source
582 | local xPlayer = ESX.GetPlayerFromId(_source)
583 |
584 | xPlayer.addWeapon(weaponName, 1000)
585 |
586 | TriggerEvent('esx_datastore:getSharedDataStore', 'society_unicorn', function(store)
587 |
588 | local weapons = store.get('weapons')
589 |
590 | if weapons == nil then
591 | weapons = {}
592 | end
593 |
594 | local foundWeapon = false
595 |
596 | for i=1, #weapons, 1 do
597 | if weapons[i].name == weaponName then
598 | weapons[i].count = (weapons[i].count > 0 and weapons[i].count - 1 or 0)
599 | foundWeapon = true
600 | end
601 | end
602 |
603 | if not foundWeapon then
604 | table.insert(weapons, {name = weaponName, count = 0})
605 | end
606 |
607 | store.set('weapons', weapons)
608 |
609 | cb()
610 | end)
611 | end)
612 |
613 | ESX.RegisterServerCallback('esx_unicornjob:getPlayerInventory', function(source, cb)
614 | local _source = source
615 | local xPlayer = ESX.GetPlayerFromId(_source)
616 | local items = xPlayer.inventory
617 |
618 | cb({items = items})
619 | end)
620 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | fxserver-esx_mecanojob
635 | Copyright (C) 2015 Jérémie N'gadi
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | fxserver-esx_mecanojob Copyright (C) 2015 Jérémie N'gadi
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
--------------------------------------------------------------------------------
/client/main.lua:
--------------------------------------------------------------------------------
1 | local isBarman, isInMarker, isInPublicMarker, hintIsShowed, HasAlreadyEnteredMarker = false, false, false, false, false
2 | local LastZone, CurrentAction, CurrentActionMsg
3 | local CurrentActionData, Blips, PlayerData = {}, {}, {}
4 | local hintToDisplay = "no hint to display"
5 |
6 | ESX = nil
7 |
8 | Citizen.CreateThread(function()
9 | while ESX == nil do
10 | TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
11 | Citizen.Wait(0)
12 | end
13 | end)
14 |
15 | function IsJobTrue()
16 | if PlayerData ~= nil then
17 | local IsJobTrue = false
18 | if PlayerData.job ~= nil and PlayerData.job.name == 'unicorn' then
19 | IsJobTrue = true
20 | end
21 | return IsJobTrue
22 | end
23 | end
24 |
25 | function IsGradeBoss()
26 | if PlayerData ~= nil then
27 | local IsGradeBoss = false
28 | if PlayerData.job.grade_name == 'boss' or PlayerData.job.grade_name == 'viceboss' then
29 | IsGradeBoss = true
30 | end
31 | return IsGradeBoss
32 | end
33 | end
34 |
35 | function SetVehicleMaxMods(vehicle)
36 | local props = {
37 | modEngine = 0,
38 | modBrakes = 0,
39 | modTransmission = 0,
40 | modSuspension = 0,
41 | modTurbo = false,
42 | }
43 |
44 | ESX.Game.SetVehicleProperties(vehicle, props)
45 | end
46 |
47 | RegisterNetEvent('esx:playerLoaded')
48 | AddEventHandler('esx:playerLoaded', function(xPlayer)
49 | PlayerData = xPlayer
50 | end)
51 |
52 | RegisterNetEvent('esx:setJob')
53 | AddEventHandler('esx:setJob', function(job)
54 | PlayerData.job = job
55 | end)
56 |
57 | function cleanPlayer(playerPed)
58 | ClearPedBloodDamage(playerPed)
59 | ResetPedVisibleDamage(playerPed)
60 | ClearPedLastWeaponDamage(playerPed)
61 | ResetPedMovementClipset(playerPed, 0)
62 | end
63 |
64 | function setClipset(playerPed, clip)
65 | RequestAnimSet(clip)
66 | while not HasAnimSetLoaded(clip) do
67 | Citizen.Wait(0)
68 | end
69 | SetPedMovementClipset(playerPed, clip, true)
70 | end
71 |
72 | function setUniform(job, playerPed)
73 | TriggerEvent('skinchanger:getSkin', function(skin)
74 |
75 | if skin.sex == 0 then
76 | if Config.Uniforms[job].male ~= nil then
77 | TriggerEvent('skinchanger:loadClothes', skin, Config.Uniforms[job].male)
78 | else
79 | ESX.ShowNotification(_U('no_outfit'))
80 | end
81 | if job ~= 'citizen_wear' and job ~= 'barman_outfit' then
82 | setClipset(playerPed, "MOVE_M@POSH@")
83 | end
84 | else
85 | if Config.Uniforms[job].female ~= nil then
86 | TriggerEvent('skinchanger:loadClothes', skin, Config.Uniforms[job].female)
87 | else
88 | ESX.ShowNotification(_U('no_outfit'))
89 | end
90 | if job ~= 'citizen_wear' and job ~= 'barman_outfit' then
91 | setClipset(playerPed, "MOVE_F@POSH@")
92 | end
93 | end
94 | end)
95 | end
96 |
97 | function OpenCloakroomMenu()
98 | local playerPed = GetPlayerPed(-1)
99 |
100 | local elements = {
101 | {label = _U('citizen_wear'), value = 'citizen_wear'},
102 | {label = _U('barman_outfit'), value = 'barman_outfit'},
103 | {label = _U('dancer_outfit_1'), value = 'dancer_outfit_1'},
104 | {label = _U('dancer_outfit_2'), value = 'dancer_outfit_2'},
105 | {label = _U('dancer_outfit_3'), value = 'dancer_outfit_3'},
106 | {label = _U('dancer_outfit_4'), value = 'dancer_outfit_4'},
107 | {label = _U('dancer_outfit_5'), value = 'dancer_outfit_5'},
108 | {label = _U('dancer_outfit_6'), value = 'dancer_outfit_6'},
109 | {label = _U('dancer_outfit_7'), value = 'dancer_outfit_7'},
110 | }
111 |
112 | ESX.UI.Menu.CloseAll()
113 |
114 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'cloakroom', {
115 | title = _U('cloakroom'),
116 | align = 'top-left',
117 | elements = elements,
118 | }, function(data, menu)
119 |
120 | isBarman = false
121 | cleanPlayer(playerPed)
122 |
123 | if data.current.value == 'citizen_wear' then
124 | ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
125 | TriggerEvent('skinchanger:loadSkin', skin)
126 | end)
127 | end
128 |
129 | if data.current.value == 'barman_outfit' then
130 | setUniform(data.current.value, playerPed)
131 | isBarman = true
132 | end
133 |
134 | if
135 | data.current.value == 'dancer_outfit_1' or
136 | data.current.value == 'dancer_outfit_2' or
137 | data.current.value == 'dancer_outfit_3' or
138 | data.current.value == 'dancer_outfit_4' or
139 | data.current.value == 'dancer_outfit_5' or
140 | data.current.value == 'dancer_outfit_6' or
141 | data.current.value == 'dancer_outfit_7'
142 | then
143 | setUniform(data.current.value, playerPed)
144 | end
145 |
146 | CurrentAction = 'menu_cloakroom'
147 | CurrentActionMsg = _U('open_cloackroom')
148 | CurrentActionData = {}
149 | end, function(data, menu)
150 | menu.close()
151 | CurrentAction = 'menu_cloakroom'
152 | CurrentActionMsg = _U('open_cloackroom')
153 | CurrentActionData = {}
154 | end)
155 | end
156 |
157 | function OpenVaultMenu()
158 | if Config.EnableVaultManagement then
159 | local elements = {
160 | {label = _U('get_weapon'), value = 'get_weapon'},
161 | {label = _U('put_weapon'), value = 'put_weapon'},
162 | {label = _U('get_object'), value = 'get_stock'},
163 | {label = _U('put_object'), value = 'put_stock'}
164 | }
165 |
166 | ESX.UI.Menu.CloseAll()
167 |
168 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vault', {
169 | title = _U('vault'),
170 | align = 'top-left',
171 | elements = elements,
172 | }, function(data, menu)
173 |
174 | if data.current.value == 'get_weapon' then
175 | OpenGetWeaponMenu()
176 | end
177 |
178 | if data.current.value == 'put_weapon' then
179 | OpenPutWeaponMenu()
180 | end
181 |
182 | if data.current.value == 'put_stock' then
183 | OpenPutStocksMenu()
184 | end
185 |
186 | if data.current.value == 'get_stock' then
187 | OpenGetStocksMenu()
188 | end
189 | end, function(data, menu)
190 |
191 | menu.close()
192 |
193 | CurrentAction = 'menu_vault'
194 | CurrentActionMsg = _U('open_vault')
195 | CurrentActionData = {}
196 | end)
197 | end
198 | end
199 |
200 | function OpenFridgeMenu()
201 | local elements = {
202 | {label = _U('get_object'), value = 'get_stock'},
203 | {label = _U('put_object'), value = 'put_stock'}
204 | }
205 |
206 | ESX.UI.Menu.CloseAll()
207 |
208 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'fridge', {
209 | title = _U('fridge'),
210 | align = 'top-left',
211 | elements = elements,
212 | }, function(data, menu)
213 |
214 | if data.current.value == 'put_stock' then
215 | OpenPutFridgeStocksMenu()
216 | end
217 |
218 | if data.current.value == 'get_stock' then
219 | OpenGetFridgeStocksMenu()
220 | end
221 | end, function(data, menu)
222 |
223 | menu.close()
224 |
225 | CurrentAction = 'menu_fridge'
226 | CurrentActionMsg = _U('open_fridge')
227 | CurrentActionData = {}
228 | end)
229 | end
230 |
231 | function OpenVehicleSpawnerMenu()
232 | local vehicles = Config.Zones.Vehicles
233 |
234 | ESX.UI.Menu.CloseAll()
235 |
236 | if Config.EnableSocietyOwnedVehicles then
237 | local elements = {}
238 |
239 | ESX.TriggerServerCallback('esx_society:getVehiclesInGarage', function(garageVehicles)
240 |
241 | for i=1, #garageVehicles, 1 do
242 | table.insert(elements, {label = GetDisplayNameFromVehicleModel(garageVehicles[i].model) .. ' [' .. garageVehicles[i].plate .. ']', value = garageVehicles[i]})
243 | end
244 |
245 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_spawner', {
246 | title = _U('vehicle_menu'),
247 | align = 'top-left',
248 | elements = elements,
249 | }, function(data, menu)
250 |
251 | menu.close()
252 |
253 | local vehicleProps = data.current.value
254 | ESX.Game.SpawnVehicle(vehicleProps.model, vehicles.SpawnPoint, vehicles.Heading, function(vehicle)
255 | ESX.Game.SetVehicleProperties(vehicle, vehicleProps)
256 | local playerPed = GetPlayerPed(-1)
257 | --TaskWarpPedIntoVehicle(playerPed, vehicle, -1) -- teleport into vehicle
258 | end)
259 |
260 | TriggerServerEvent('esx_society:removeVehicleFromGarage', 'unicorn', vehicleProps)
261 | end, function(data, menu)
262 |
263 | menu.close()
264 |
265 | CurrentAction = 'menu_vehicle_spawner'
266 | CurrentActionMsg = _U('vehicle_spawner')
267 | CurrentActionData = {}
268 |
269 | end)
270 | end, 'unicorn')
271 | else
272 | local elements = {}
273 |
274 | for i=1, #Config.AuthorizedVehicles, 1 do
275 | local vehicle = Config.AuthorizedVehicles[i]
276 | table.insert(elements, {label = vehicle.label, value = vehicle.name})
277 | end
278 |
279 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_spawner', {
280 | title = _U('vehicle_menu'),
281 | align = 'top-left',
282 | elements = elements,
283 | }, function(data, menu)
284 |
285 | menu.close()
286 |
287 | local model = data.current.value
288 |
289 | local vehicle = GetClosestVehicle(vehicles.SpawnPoint.x, vehicles.SpawnPoint.y, vehicles.SpawnPoint.z, 3.0, 0, 71)
290 |
291 | if not DoesEntityExist(vehicle) then
292 |
293 | local playerPed = GetPlayerPed(-1)
294 |
295 | if Config.MaxInService == -1 then
296 |
297 | ESX.Game.SpawnVehicle(model, {
298 | x = vehicles.SpawnPoint.x,
299 | y = vehicles.SpawnPoint.y,
300 | z = vehicles.SpawnPoint.z
301 | }, vehicles.Heading, function(vehicle)
302 | --TaskWarpPedIntoVehicle(playerPed, vehicle, -1) -- teleport into vehicle
303 | SetVehicleMaxMods(vehicle)
304 | SetVehicleDirtLevel(vehicle, 0)
305 | end)
306 | else
307 | ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount)
308 |
309 | if canTakeService then
310 | ESX.Game.SpawnVehicle(model, {
311 | x = vehicles[partNum].SpawnPoint.x,
312 | y = vehicles[partNum].SpawnPoint.y,
313 | z = vehicles[partNum].SpawnPoint.z
314 | }, vehicles[partNum].Heading, function(vehicle)
315 | --TaskWarpPedIntoVehicle(playerPed, vehicle, -1) -- teleport into vehicle
316 | SetVehicleMaxMods(vehicle)
317 | SetVehicleDirtLevel(vehicle, 0)
318 | end)
319 | else
320 | ESX.ShowNotification(_U('service_max') .. inServiceCount .. '/' .. maxInService)
321 | end
322 | end, 'etat')
323 | end
324 | else
325 | ESX.ShowNotification(_U('vehicle_out'))
326 | end
327 | end, function(data, menu)
328 |
329 | menu.close()
330 |
331 | CurrentAction = 'menu_vehicle_spawner'
332 | CurrentActionMsg = _U('vehicle_spawner')
333 | CurrentActionData = {}
334 | end)
335 | end
336 | end
337 |
338 | function OpenSocietyActionsMenu()
339 | local elements = {}
340 |
341 | table.insert(elements, {label = _U('billing'), value = 'billing'})
342 | if (isBarman or IsGradeBoss()) then
343 | table.insert(elements, {label = _U('crafting'), value = 'menu_crafting'})
344 | end
345 |
346 | ESX.UI.Menu.CloseAll()
347 |
348 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'unicorn_actions', {
349 | title = _U('unicorn'),
350 | align = 'top-left',
351 | elements = elements
352 | }, function(data, menu)
353 |
354 | if data.current.value == 'billing' then
355 | OpenBillingMenu()
356 | end
357 |
358 | if data.current.value == 'menu_crafting' then
359 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'menu_crafting', {
360 | title = _U('crafting'),
361 | align = 'top-left',
362 | elements = {
363 | {label = _U('jagerbomb'), value = 'jagerbomb'},
364 | {label = _U('golem'), value = 'golem'},
365 | {label = _U('whiskycoca'), value = 'whiskycoca'},
366 | {label = _U('vodkaenergy'), value = 'vodkaenergy'},
367 | {label = _U('vodkafruit'), value = 'vodkafruit'},
368 | {label = _U('rhumfruit'), value = 'rhumfruit'},
369 | {label = _U('teqpaf'), value = 'teqpaf'},
370 | {label = _U('rhumcoca'), value = 'rhumcoca'},
371 | {label = _U('mojito'), value = 'mojito'},
372 | {label = _U('mixapero'), value = 'mixapero'},
373 | {label = _U('metreshooter'), value = 'metreshooter'},
374 | {label = _U('jagercerbere'), value = 'jagercerbere'},
375 | }}, function(data2, menu2)
376 |
377 | TriggerServerEvent('esx_unicornjob:craftingCoktails', data2.current.value)
378 | animsAction({ lib = "mini@drinking", anim = "shots_barman_b" })
379 | end, function(data2, menu2)
380 | menu2.close()
381 | end)
382 | end
383 | end, function(data, menu)
384 |
385 | menu.close()
386 | end)
387 | end
388 |
389 | function OpenBillingMenu()
390 | ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'billing', {
391 | title = _U('billing_amount')
392 | }, function(data, menu)
393 |
394 | local amount = tonumber(data.value)
395 | local player, distance = ESX.Game.GetClosestPlayer()
396 |
397 | if player ~= -1 and distance <= 3.0 then
398 | menu.close()
399 |
400 | if amount == nil then
401 | ESX.ShowNotification(_U('amount_invalid'))
402 | else
403 | TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(player), 'society_unicorn', _U('billing'), amount)
404 | end
405 | else
406 | ESX.ShowNotification(_U('no_players_nearby'))
407 | end
408 | end, function(data, menu)
409 | menu.close()
410 | end)
411 | end
412 |
413 | function OpenGetStocksMenu()
414 | ESX.TriggerServerCallback('esx_unicornjob:getStockItems', function(items)
415 |
416 | print(json.encode(items))
417 |
418 | local elements = {}
419 |
420 | for i=1, #items, 1 do
421 | table.insert(elements, {label = 'x' .. items[i].count .. ' ' .. items[i].label, value = items[i].name})
422 | end
423 |
424 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', {
425 | title = _U('unicorn_stock'),
426 | elements = elements
427 | }, function(data, menu)
428 |
429 | local itemName = data.current.value
430 |
431 | ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count', {
432 | title = _U('quantity')
433 | }, function(data2, menu2)
434 |
435 | local count = tonumber(data2.value)
436 |
437 | if count == nil then
438 | ESX.ShowNotification(_U('invalid_quantity'))
439 | else
440 | menu2.close()
441 | menu.close()
442 | OpenGetStocksMenu()
443 |
444 | TriggerServerEvent('esx_unicornjob:getStockItem', itemName, count)
445 | end
446 | end, function(data2, menu2)
447 | menu2.close()
448 | end)
449 | end, function(data, menu)
450 | menu.close()
451 | end)
452 | end)
453 | end
454 |
455 | function OpenPutStocksMenu()
456 | ESX.TriggerServerCallback('esx_unicornjob:getPlayerInventory', function(inventory)
457 |
458 | local elements = {}
459 |
460 | for i=1, #inventory.items, 1 do
461 | local item = inventory.items[i]
462 |
463 | if item.count > 0 then
464 | table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name})
465 | end
466 | end
467 |
468 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', {
469 | title = _U('inventory'),
470 | elements = elements
471 | }, function(data, menu)
472 |
473 | local itemName = data.current.value
474 |
475 | ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count', {
476 | title = _U('quantity')
477 | }, function(data2, menu2)
478 |
479 | local count = tonumber(data2.value)
480 |
481 | if count == nil then
482 | ESX.ShowNotification(_U('invalid_quantity'))
483 | else
484 | menu2.close()
485 | menu.close()
486 | OpenPutStocksMenu()
487 |
488 | TriggerServerEvent('esx_unicornjob:putStockItems', itemName, count)
489 | end
490 | end, function(data2, menu2)
491 | menu2.close()
492 | end)
493 | end, function(data, menu)
494 | menu.close()
495 | end)
496 | end)
497 | end
498 |
499 | function OpenGetFridgeStocksMenu()
500 | ESX.TriggerServerCallback('esx_unicornjob:getFridgeStockItems', function(items)
501 |
502 | print(json.encode(items))
503 |
504 | local elements = {}
505 |
506 | for i=1, #items, 1 do
507 | table.insert(elements, {label = 'x' .. items[i].count .. ' ' .. items[i].label, value = items[i].name})
508 | end
509 |
510 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'fridge_menu', {
511 | title = _U('unicorn_fridge_stock'),
512 | elements = elements
513 | }, function(data, menu)
514 |
515 | local itemName = data.current.value
516 |
517 | ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'fridge_menu_get_item_count', {
518 | title = _U('quantity')
519 | }, function(data2, menu2)
520 |
521 | local count = tonumber(data2.value)
522 |
523 | if count == nil then
524 | ESX.ShowNotification(_U('invalid_quantity'))
525 | else
526 | menu2.close()
527 | menu.close()
528 | OpenGetStocksMenu()
529 |
530 | TriggerServerEvent('esx_unicornjob:getFridgeStockItem', itemName, count)
531 | end
532 | end, function(data2, menu2)
533 | menu2.close()
534 | end)
535 | end, function(data, menu)
536 | menu.close()
537 | end)
538 | end)
539 | end
540 |
541 | function OpenPutFridgeStocksMenu()
542 | ESX.TriggerServerCallback('esx_unicornjob:getPlayerInventory', function(inventory)
543 |
544 | local elements = {}
545 |
546 | for i=1, #inventory.items, 1 do
547 | local item = inventory.items[i]
548 |
549 | if item.count > 0 then
550 | table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name})
551 | end
552 | end
553 |
554 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'fridge_menu', {
555 | title = _U('fridge_inventory'),
556 | elements = elements
557 | }, function(data, menu)
558 |
559 | local itemName = data.current.value
560 |
561 | ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'fridge_menu_put_item_count', {
562 | title = _U('quantity')
563 | }, function(data2, menu2)
564 |
565 | local count = tonumber(data2.value)
566 |
567 | if count == nil then
568 | ESX.ShowNotification(_U('invalid_quantity'))
569 | else
570 | menu2.close()
571 | menu.close()
572 | OpenPutFridgeStocksMenu()
573 |
574 | TriggerServerEvent('esx_unicornjob:putFridgeStockItems', itemName, count)
575 | end
576 | end, function(data2, menu2)
577 | menu2.close()
578 | end)
579 | end, function(data, menu)
580 | menu.close()
581 | end)
582 | end)
583 | end
584 |
585 | function OpenGetWeaponMenu()
586 | ESX.TriggerServerCallback('esx_unicornjob:getVaultWeapons', function(weapons)
587 |
588 | local elements = {}
589 |
590 | for i=1, #weapons, 1 do
591 | if weapons[i].count > 0 then
592 | table.insert(elements, {label = 'x' .. weapons[i].count .. ' ' .. ESX.GetWeaponLabel(weapons[i].name), value = weapons[i].name})
593 | end
594 | end
595 |
596 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vault_get_weapon', {
597 | title = _U('get_weapon_menu'),
598 | align = 'top-left',
599 | elements = elements,
600 | }, function(data, menu)
601 |
602 | menu.close()
603 |
604 | ESX.TriggerServerCallback('esx_unicornjob:removeVaultWeapon', function()
605 | OpenGetWeaponMenu()
606 | end, data.current.value)
607 | end, function(data, menu)
608 | menu.close()
609 | end)
610 | end)
611 | end
612 |
613 | function OpenPutWeaponMenu()
614 | local elements = {}
615 | local playerPed = GetPlayerPed(-1)
616 | local weaponList = ESX.GetWeaponList()
617 |
618 | for i=1, #weaponList, 1 do
619 | local weaponHash = GetHashKey(weaponList[i].name)
620 |
621 | if HasPedGotWeapon(playerPed, weaponHash, false) and weaponList[i].name ~= 'WEAPON_UNARMED' then
622 | local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
623 | table.insert(elements, {label = weaponList[i].label, value = weaponList[i].name})
624 | end
625 | end
626 |
627 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vault_put_weapon', {
628 | title = _U('put_weapon_menu'),
629 | align = 'top-left',
630 | elements = elements,
631 | }, function(data, menu)
632 |
633 | menu.close()
634 |
635 | ESX.TriggerServerCallback('esx_unicornjob:addVaultWeapon', function()
636 | OpenPutWeaponMenu()
637 | end, data.current.value)
638 | end, function(data, menu)
639 | menu.close()
640 | end)
641 | end
642 |
643 | function OpenShopMenu(zone)
644 | local elements = {}
645 |
646 | for i=1, #Config.Zones[zone].Items, 1 do
647 | local item = Config.Zones[zone].Items[i]
648 |
649 | table.insert(elements, {
650 | label = item.label .. ' - $' .. item.price .. ' ',
651 | realLabel = item.label,
652 | value = item.name,
653 | price = item.price
654 | })
655 | end
656 |
657 | ESX.UI.Menu.CloseAll()
658 |
659 | ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'unicorn_shop', {
660 | title = _U('shop'),
661 | elements = elements
662 | }, function(data, menu)
663 | TriggerServerEvent('esx_unicornjob:buyItem', data.current.value, data.current.price, data.current.realLabel)
664 | end, function(data, menu)
665 | menu.close()
666 | end)
667 | end
668 |
669 | function animsAction(animObj)
670 | Citizen.CreateThread(function()
671 | if not playAnim then
672 | local playerPed = GetPlayerPed(-1);
673 | if DoesEntityExist(playerPed) then -- Check if ped exist
674 | dataAnim = animObj
675 |
676 | -- Play Animation
677 | RequestAnimDict(dataAnim.lib)
678 | while not HasAnimDictLoaded(dataAnim.lib) do
679 | Citizen.Wait(0)
680 | end
681 | if HasAnimDictLoaded(dataAnim.lib) then
682 | local flag = 0
683 | if dataAnim.loop ~= nil and dataAnim.loop then
684 | flag = 1
685 | elseif dataAnim.move ~= nil and dataAnim.move then
686 | flag = 49
687 | end
688 |
689 | TaskPlayAnim(playerPed, dataAnim.lib, dataAnim.anim, 8.0, -8.0, -1, flag, 0, 0, 0, 0)
690 | playAnimation = true
691 | end
692 |
693 | -- Wait end animation
694 | while true do
695 | Citizen.Wait(0)
696 | if not IsEntityPlayingAnim(playerPed, dataAnim.lib, dataAnim.anim, 3) then
697 | playAnim = false
698 | TriggerEvent('ft_animation:ClFinish')
699 | break
700 | end
701 | end
702 | end -- end ped exist
703 | end
704 | end)
705 | end
706 |
707 | AddEventHandler('esx_unicornjob:hasEnteredMarker', function(zone)
708 | if zone == 'BossActions' and IsGradeBoss() then
709 | CurrentAction = 'menu_boss_actions'
710 | CurrentActionMsg = _U('open_bossmenu')
711 | CurrentActionData = {}
712 | end
713 |
714 | if zone == 'Cloakrooms' then
715 | CurrentAction = 'menu_cloakroom'
716 | CurrentActionMsg = _U('open_cloackroom')
717 | CurrentActionData = {}
718 | end
719 |
720 | if Config.EnableVaultManagement then
721 | if zone == 'Vaults' then
722 | CurrentAction = 'menu_vault'
723 | CurrentActionMsg = _U('open_vault')
724 | CurrentActionData = {}
725 | end
726 | end
727 |
728 | if zone == 'Fridge' then
729 | CurrentAction = 'menu_fridge'
730 | CurrentActionMsg = _U('open_fridge')
731 | CurrentActionData = {}
732 | end
733 |
734 | if zone == 'Flacons' or zone == 'NoAlcool' or zone == 'Apero' or zone == 'Ice' then
735 | CurrentAction = 'menu_shop'
736 | CurrentActionMsg = _U('shop_menu')
737 | CurrentActionData = {zone = zone}
738 | end
739 |
740 | if zone == 'Vehicles' then
741 | CurrentAction = 'menu_vehicle_spawner'
742 | CurrentActionMsg = _U('vehicle_spawner')
743 | CurrentActionData = {}
744 | end
745 |
746 | if zone == 'VehicleDeleters' then
747 | local playerPed = GetPlayerPed(-1)
748 |
749 | if IsPedInAnyVehicle(playerPed, false) then
750 | local vehicle = GetVehiclePedIsIn(playerPed, false)
751 |
752 | CurrentAction = 'delete_vehicle'
753 | CurrentActionMsg = _U('store_vehicle')
754 | CurrentActionData = {vehicle = vehicle}
755 | end
756 | end
757 |
758 | if Config.EnableHelicopters then
759 | if zone == 'Helicopters' then
760 | local helicopters = Config.Zones.Helicopters
761 |
762 | if not IsAnyVehicleNearPoint(helicopters.SpawnPoint.x, helicopters.SpawnPoint.y, helicopters.SpawnPoint.z, 3.0) then
763 |
764 | ESX.Game.SpawnVehicle('swift2', {
765 | x = helicopters.SpawnPoint.x,
766 | y = helicopters.SpawnPoint.y,
767 | z = helicopters.SpawnPoint.z
768 | }, helicopters.Heading, function(vehicle)
769 | SetVehicleModKit(vehicle, 0)
770 | SetVehicleLivery(vehicle, 0)
771 | end)
772 | end
773 | end
774 |
775 | if zone == 'HelicopterDeleters' then
776 | local playerPed = GetPlayerPed(-1)
777 |
778 | if IsPedInAnyVehicle(playerPed, false) then
779 | local vehicle = GetVehiclePedIsIn(playerPed, false)
780 |
781 | CurrentAction = 'delete_vehicle'
782 | CurrentActionMsg = _U('store_vehicle')
783 | CurrentActionData = {vehicle = vehicle}
784 | end
785 | end
786 | end
787 | end)
788 |
789 | AddEventHandler('esx_unicornjob:hasExitedMarker', function(zone)
790 | CurrentAction = nil
791 | ESX.UI.Menu.CloseAll()
792 | end)
793 |
794 | RegisterNetEvent('esx_phone:loaded')
795 | AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts)
796 | local specialContact = {
797 | name = _U('unicorn_phone'),
798 | number = 'unicorn',
799 | base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAA7amlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDoxMDQwMDUzRUQ2Q0JFMTExOTQwOTgyNTk4MzYxRUYyMzwveG1wTU06T3JpZ2luYWxEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06RG9jdW1lbnRJRD5hZG9iZTpkb2NpZDpwaG90b3Nob3A6YjhkMDYxYTktYzdjOC0xMWU3LWExMzAtZDMzYTkwMzA3ZWYyPC94bXBNTTpEb2N1bWVudElEPgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOjAxMWEzZDQwLWFiOTgtYjI0Yi05MjM2LTA2ZjY4NjQ0ODRjODwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRlcml2ZWRGcm9tIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgPHN0UmVmOmluc3RhbmNlSUQ+eG1wLmlpZDo4RTQyQzM3Njc2RDFFMTExOUE5RUVCNUNGNTQ5MzZCRjwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDoxMDQwMDUzRUQ2Q0JFMTExOTQwOTgyNTk4MzYxRUYyMzwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgPC94bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5zYXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6aW5zdGFuY2VJRD54bXAuaWlkOjk1YWFmODAyLTQzY2YtOTg0MC04YjVmLTNmNWJjOGZjNGU4Mjwvc3RFdnQ6aW5zdGFuY2VJRD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OndoZW4+MjAxNy0xMS0xMlQxNzo0NDoxNiswMTowMDwvc3RFdnQ6d2hlbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OnNvZnR3YXJlQWdlbnQ+QWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+c2F2ZWQ8L3N0RXZ0OmFjdGlvbj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0Omluc3RhbmNlSUQ+eG1wLmlpZDowMTFhM2Q0MC1hYjk4LWIyNGItOTIzNi0wNmY2ODY0NDg0Yzg8L3N0RXZ0Omluc3RhbmNlSUQ+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDp3aGVuPjIwMTctMTEtMTJUMTc6NDQ6MTYrMDE6MDA8L3N0RXZ0OndoZW4+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChXaW5kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE3IChXaW5kb3dzKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxNy0xMS0xMlQxNzozODo0MSswMTowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE3LTExLTEyVDE3OjQ0OjE2KzAxOjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNy0xMS0xMlQxNzo0NDoxNiswMTowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9wbmc8L2RjOmZvcm1hdD4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzIwMDAwLzEwMDAwPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+NjU1MzU8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjMyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjMyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6e1E46AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAsCSURBVHjaxJd7dFX1lcc/53fOfSY3ubl5XUICSUxCAkEg4R0rIPhApQW0tCwtD7VjK0PbUeuoU6mIts7SJVq1FKnTIrSjUqgVkGJ5DQhCCeERHiEghoRAEpLc3Htzn+fxmz+uoLZlOWv+6T5rr3XWOuf3+333/u3Hd6tF2X5y0jMJJqMIoSKEuKpSWuRmZJGT5iUY60doKgVp2QUzfdff6bY70i8kAheQUOUrKp2ZOfwbfSSiQZnokdLC5/GS5nQRTcZRNe1L+15RyzQRfIXo0iQpTQCksKi1FUyfbgxaWJnI/PqVf4qkZ9yticKFdUrhXIFydV1CGl+1Pdq1PigoIMGwC2yqLQVAkcyID142Puoe4KLw5ub03vqEw4rOiZUur47a831U3LjG3rAUCYqmomkahMP/PwCmNCnL9Fc/oox7ywzFvMszzDuGOHPrtJDprucy6ThYEbtpvZJQ6NSDHKMXhGCebeTP96Z1/naOqFpWE8+64Tn3x/ceTV7aoSBSRv2toUXZfixL0h7oRNVSeCRgKQaLbGNXPxAtm3eGPhSngwo9k6RpcpaAfp7LDVHUaB/hbhu4/WSU1lBYVYCL0+5+krEEg6SLg1rwzGKxtUKxVMTfADB0HaEJ4SvJzq0eWlxSaRoGpmFgWQbosFV++nqbSBDDwIj3sc7ct+FB1kx6nD3lv8zru38Z+27eO1lbVfSb6fHu+QUnf6Ltu2uN0rwlPaqgSQhisZlzKzBAGiYmxt95QdFU1Z3nySh6eMaMZ0lXg6vf3vUmgcCgQJo4eK9t+JqxQcfEgRVDOVRubFvrCPx3Vs2QnBsm183PT1Bp6Sd7brhlaO4v/mX5it0fntx8/Py5zQBVWu7URcbItQXY/Z9okU9fdR2/udiZMywYCcWPJi5+qCraVQ8oiqoizVSU/9utt616YuasB9pOX2Lnqn3hnEjUcxnOv5B2/Mbf/Pi5rZXFdZVngx1UzbqO3pbT6GlJOo+f4MP/+mD7KfXi74qKSz0n9necPHDy1DaAF51T266PZxS2OBLkCTfBRIQn1b1V7TLcpKJi6DqqqqZyX2Kx/+zZP/v3RZ4q/vogc/QT42QCV+ytw/vfS9fNfN+u9jmV5X61PDeLfPtA/JEsCvqLGGiVM27E+NK5c6Z+oy5XTG8+dloLSWfzLXNrbxz1QPHg9Rv/2lZlZhW3Gn2UyCwOi+49FwieEAiWLFkCqqZdVRQoxTv7GWrlr2vvDLf+z4pI5+F3rJdH3xleSo2MNLZJmZQyuqtJxnefkYntp2VsS6OUZ4JSHo7K1tUNcudDT8u/rLxPSrlBvrTk7tWA/YeMvLieGfJubegraCBUFVXTkFIi+CzfTQxIg5KcgsIRSiH7D507UjLp+9ft2LJz19D89PQb5t9Hy/YG1s38Mc6qQiyXgDw3zsEF9B84STLaTtG4wUz+wU/RDpRx8cB6Hlo0al5r81PNIxaV9p/gMpppXYcDLJt5NQiFZRmYwuRGT/n3FjvrNkwM+5b3yThHtOCrJnTMffJXNzW3u3unvLyQeKQfX34emKDaXGx6+BXOH2sifdL1JJo60CP9GJ1nqVvwEEpoLI68AIphZS98bXL5tFeqyJDqHYvVCZtut1U+b2KlAEhFotptyk2JghXl3WKWmjBEkxIMNyidf0ABG1RNv2+2T/G6MfxpFFSUoHjTsPsyKSu+jp99ey7Bi5dwjywlcbYLmWmHaBfOyGzoyuGjbccOKMoPtE/toc2jJxaavpB5xy1h/7/7FHchgECAairqBT14MvhZnrYp4UMWhoUqMKF9645tZ6xDXYQOnsXmdGAkY2CpOIWdZlrZ+sRrqEMKkLqJGUpgGFHS7Ar1a/P49uKJU787v3bWPd9/7/lI2BICjahiRjWJC0CoUkPXdePX8siwXfbOlZk46SPedgWdBaGdp+q3Cl0y7XvfIRoKozVcJPqnAyxduexSLgXy4M69JA+cwTXQh9ERQvV7UTUTpx3qX2sMvfHb2esenVDzfENjl9WmRXY9rX3s7yJyBkAopB5MaHXGNgLEMfQvVqtANHwZtwbeTKRusvmpX+qTnrj3O7+npSaPfMXUoG3vEbTcLITThuKyIZFUjxlB4+Gu5ntvX/vMY8+OqEtDqqes3qNJxQgrUnwWhNJEU1V1RPbgb41X/M9eJIRAZHypY/nSDDwuwocaGVZczp4Lx9vqo21rXQ5Xd5gY026/jRxHBnpLJ8KpYQVjmLEgoY4cFi6eNrr+yIX3Fz637dFho3wUSc+3ah2D/tUu1PQUAMVCUVWlrj/vbXcwObKbBE60KlCwkFdao9LX0Mj7b73D77e/z8/+Y2npyJLKMiMRHxAlQrYni8yKUgzFworrmOd6MDWLlsP1nNvYzeEtszbbL3tzPjjcEXNIyz+tf8CrXpxlqWsGEkbM+MTo2e/BhYmFx9KGeaTTD6l87e/t0zNNO9V1Y5j8yD10BwOYCZ0yxfdDAwMjGod0O9rgbKyojtndjy3Nx+UjGzi/cxeBHbH8N1+d8HjdtJy4Jmz0yKjRI6OnUkGIipAqu2m/63e2pnEXlEijFzuDpWcxCiiq4KOLp36x4s/vnhxRMxnlRCejltwztqnzvFEsbY8MG1DNiJpaLDWJFYySbO5EzfUQDSSpyulnytcgPaSz8T+PRxwFGd3Hc4KPvyuayw2sBPB5KcaWKoo+R/qohWK4nKWUxTWbTcWmoGgqAHf7a9dkIibgUPlm+vDLE/DILbc8KeWmFpk81S6Dq3bLwI/WSXmqW3a/tksenfOYPD5vngw/Nk3Kpd+U15OzHAAbV0uxcoWEWJaF2+nKqnUVvpTZZyxwmiptavS9/eLCLEUKUARSN0CF6c7yS9kJu3/+hBkM+VoNRbePIXS0Bb2pk7SqPLR0lUN/PcvRYCZj0728u31lcvzgpvCU0jwzb9WeoQmMHiFEipBciXSJxIGanx9gAaaFiaTIdM8crgx4QQordTiwoHzKmUik3z++tJpps+4ib3QFvX+sJ77pBNnDBtHQc57nl6+mNWYnqyibxjO7w9VDb7Iv+4umHj8dzLu7YsBsaVmf94IrL6pQ6U2Emg7Kjp9LRVw8L8Lv9hGnLJn26Agx4HWHy0ltVsnL+Z6sskG2HO5/8EGMIge2bafwdQfwjc+nN9TNr9KG0DagELW7l+KEkJv2b9De3vvGx7WlFcqL+1oD/UYy9iVGdOUKrpLRVOrZwNSL8P5oqOldjpR0Ofpbpk6cWuzPyaNaz+bWl57GemcrR1TJ+ppqrMPHyKeAPZea6Fn+Xe6/700yI308vO7RFz4xw884VbvPpmkel9A8XYnwflWkCMnfsWKRIqW6lOBId0XpF4TNODkJZ/HR/fV8mu2FUWPIensdtF/ig45ONh47BrYEGfVv0N34JyYPnIoZ6Yy+/scX3TEzmY9Gf9xK9sdNi7CeQBXqtT1w1RPCogTvTyuTGU8LBBdE5A92ixt1Enm9hAALP3n4EQTpIATYUPHgN0RB3spQZ/uCLFNN6xJsblA77xRSfGHm+JwVXxNAqgAaDMCzyIHmbVECzymqzTbGymtVdNOvIYhhnNYxe9zYJ0okTjQatUBtwIg0eNBmF6jemtOi9ydCKv9wJvhKAACmkop+xdKQmmSYzNlRmnRPCaAHPrK1+1AkFUb2B5WWd3o38dA+rSMztdICRaJI7Zrz3/8JwBdFIhFSyczFdVsEoy2kxPcpKDjQSnzSOalXie9IYrb+I2uvCUBKyT9TBP9k+d8BAIOiDfLikcyeAAAAAElFTkSuQmCC'
800 | }
801 | TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon)
802 | end)
803 |
804 | -- Create blips
805 | Citizen.CreateThread(function()
806 | local blipMarker = Config.Blips.Blip
807 | local blipCoord = AddBlipForCoord(blipMarker.Pos.x, blipMarker.Pos.y, blipMarker.Pos.z)
808 |
809 | SetBlipSprite (blipCoord, blipMarker.Sprite)
810 | SetBlipDisplay(blipCoord, blipMarker.Display)
811 | SetBlipScale (blipCoord, blipMarker.Scale)
812 | SetBlipColour (blipCoord, blipMarker.Colour)
813 | SetBlipAsShortRange(blipCoord, true)
814 |
815 | BeginTextCommandSetBlipName("STRING")
816 | AddTextComponentString(_U('map_blip'))
817 | EndTextCommandSetBlipName(blipCoord)
818 | end)
819 |
820 | -- Display markers
821 | Citizen.CreateThread(function()
822 | while true do
823 |
824 | Wait(0)
825 | if IsJobTrue() then
826 |
827 | local coords = GetEntityCoords(GetPlayerPed(-1))
828 |
829 | for k,v in pairs(Config.Zones) do
830 | if(v.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then
831 | DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, false, 2, false, false, false, false)
832 | end
833 | end
834 | end
835 | end
836 | end)
837 |
838 | -- Enter / Exit marker events
839 | Citizen.CreateThread(function()
840 | while true do
841 |
842 | Wait(0)
843 | if IsJobTrue() then
844 | local coords = GetEntityCoords(GetPlayerPed(-1))
845 | local isInMarker = false
846 | local currentZone = nil
847 |
848 | for k,v in pairs(Config.Zones) do
849 | if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then
850 | isInMarker = true
851 | currentZone = k
852 | end
853 | end
854 |
855 | if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then
856 | HasAlreadyEnteredMarker = true
857 | LastZone = currentZone
858 | TriggerEvent('esx_unicornjob:hasEnteredMarker', currentZone)
859 | end
860 |
861 | if not isInMarker and HasAlreadyEnteredMarker then
862 | HasAlreadyEnteredMarker = false
863 | TriggerEvent('esx_unicornjob:hasExitedMarker', LastZone)
864 | end
865 | end
866 | end
867 | end)
868 |
869 | -- Key Controls
870 | Citizen.CreateThread(function()
871 | while true do
872 |
873 | Citizen.Wait(0)
874 |
875 | if CurrentAction ~= nil then
876 | SetTextComponentFormat('STRING')
877 | AddTextComponentString(CurrentActionMsg)
878 | DisplayHelpTextFromStringLabel(0, 0, 1, -1)
879 |
880 | if IsControlJustReleased(0, 38) and IsJobTrue() then
881 |
882 | if CurrentAction == 'menu_cloakroom' then
883 | OpenCloakroomMenu()
884 | end
885 |
886 | if CurrentAction == 'menu_vault' then
887 | OpenVaultMenu()
888 | end
889 |
890 | if CurrentAction == 'menu_fridge' then
891 | OpenFridgeMenu()
892 | end
893 |
894 | if CurrentAction == 'menu_shop' then
895 | OpenShopMenu(CurrentActionData.zone)
896 | end
897 |
898 | if CurrentAction == 'menu_vehicle_spawner' then
899 | OpenVehicleSpawnerMenu()
900 | end
901 |
902 | if CurrentAction == 'delete_vehicle' then
903 |
904 | if Config.EnableSocietyOwnedVehicles then
905 | local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle)
906 | TriggerServerEvent('esx_society:putVehicleInGarage', 'unicorn', vehicleProps)
907 | else
908 | if GetEntityModel(vehicle) == GetHashKey('rentalbus') then
909 | TriggerServerEvent('esx_service:disableService', 'unicorn')
910 | end
911 | end
912 |
913 | ESX.Game.DeleteVehicle(CurrentActionData.vehicle)
914 | end
915 |
916 | if CurrentAction == 'menu_boss_actions' and IsGradeBoss() then
917 | local options = {
918 | wash = Config.EnableMoneyWash,
919 | }
920 |
921 | ESX.UI.Menu.CloseAll()
922 |
923 | TriggerEvent('esx_society:openBossMenu', 'unicorn', function(data, menu)
924 |
925 | menu.close()
926 | CurrentAction = 'menu_boss_actions'
927 | CurrentActionMsg = _U('open_bossmenu')
928 | CurrentActionData = {}
929 | end,options)
930 | end
931 |
932 | CurrentAction = nil
933 | end
934 | end
935 |
936 | if IsControlJustReleased(0, 167) and IsJobTrue() and not ESX.UI.Menu.IsOpen('default', GetCurrentResourceName(), 'unicorn_actions') then
937 | OpenSocietyActionsMenu()
938 | end
939 | end
940 | end)
941 |
942 | -----------------------
943 | ----- TELEPORTERS -----
944 | AddEventHandler('esx_unicornjob:teleportMarkers', function(position)
945 | SetEntityCoords(GetPlayerPed(-1), position.x, position.y, position.z)
946 | end)
947 |
948 | -- Show top left hint
949 | Citizen.CreateThread(function()
950 | while true do
951 | Wait(0)
952 | if hintIsShowed == true then
953 | SetTextComponentFormat("STRING")
954 | AddTextComponentString(hintToDisplay)
955 | DisplayHelpTextFromStringLabel(0, 0, 1, -1)
956 | end
957 | end
958 | end)
959 |
960 | -- Display teleport markers
961 | Citizen.CreateThread(function()
962 | while true do
963 | Wait(0)
964 |
965 | if IsJobTrue() then
966 | local coords = GetEntityCoords(GetPlayerPed(-1))
967 |
968 | for k,v in pairs(Config.TeleportZones) do
969 | if(v.Marker ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then
970 | DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false)
971 | end
972 | end
973 | end
974 | end
975 | end)
976 |
977 | -- Activate teleport marker
978 | Citizen.CreateThread(function()
979 | while true do
980 | Wait(0)
981 | local coords = GetEntityCoords(GetPlayerPed(-1))
982 | local position = nil
983 | local zone = nil
984 |
985 | if IsJobTrue() then
986 | for k,v in pairs(Config.TeleportZones) do
987 | if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then
988 | isInPublicMarker = true
989 | position = v.Teleport
990 | zone = v
991 | break
992 | else
993 | isInPublicMarker = false
994 | end
995 | end
996 |
997 | if IsControlJustReleased(0, 38) and isInPublicMarker then
998 | TriggerEvent('esx_unicornjob:teleportMarkers', position)
999 | end
1000 |
1001 | -- hide or show top left zone hints
1002 | if isInPublicMarker then
1003 | hintToDisplay = zone.Hint
1004 | hintIsShowed = true
1005 | else
1006 | if not isInMarker then
1007 | hintToDisplay = "no hint to display"
1008 | hintIsShowed = false
1009 | end
1010 | end
1011 | end
1012 | end
1013 | end)
1014 |
--------------------------------------------------------------------------------