chore(coding-style): correct indentation

This commit is contained in:
Romain Lanz
2017-09-14 18:04:21 +02:00
parent e5d22d61a8
commit f9cd4f7ebc
9 changed files with 1179 additions and 1175 deletions
+9
View File
@@ -0,0 +1,9 @@
root = true
[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+10 -10
View File
@@ -3,17 +3,17 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'ESX Mecano Job'
client_scripts {
'@es_extended/locale.lua',
'locales/en.lua',
'locales/fr.lua',
'config.lua',
'client/main.lua'
'@es_extended/locale.lua',
'locales/en.lua',
'locales/fr.lua',
'config.lua',
'client/main.lua'
}
server_scripts {
'@es_extended/locale.lua',
'locales/en.lua',
'locales/fr.lua',
'config.lua',
'server/main.lua'
'@es_extended/locale.lua',
'locales/en.lua',
'locales/fr.lua',
'config.lua',
'server/main.lua'
}
+748 -747
View File
File diff suppressed because it is too large Load Diff
+88 -92
View File
@@ -5,112 +5,108 @@ Config.EnablePlayerManagement = false
Config.EnableSocietyOwnedVehicles = false
Config.NPCSpawnDistance = 500.0
Config.NPCNextToDistance = 25.0
Config.NPCJobEarnings = {min = 15, max = 40}
Config.Locale = 'fr'
Config.NPCJobEarnings = { min = 15, max = 40 }
Config.Locale = 'fr'
Config.Zones = {
MecanoActions = {
Pos = { x = -347.291, y = -133.370, z = 38.009 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = 1,
},
MecanoActions = {
Pos = {x = -347.291, y = -133.370, z = 38.009},
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
},
Garage = {
Pos = { x = -97.5797576904297, y = 6496.11376953125, z = 30.4909038543701 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = 1,
},
Garage = {
Pos = {x = -97.5797576904297, y = 6496.11376953125, z = 30.4909038543701},
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
},
Craft = {
Pos = { x = -323.140, y = -129.882, z = 37.999 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = 1,
},
Craft = {
Pos = {x = -323.140, y = -129.882, z = 37.999},
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
},
VehicleSpawnPoint = {
Pos = { x = -366.354, y = -110.766, z = 37.696 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = -1,
},
VehicleSpawnPoint = {
Pos = {x = -366.354, y = -110.766, z = 37.696},
Size = {x = 1.5, y = 1.5, z = 1.0},
Type = -1
},
VehicleDeleter = {
Pos = {x = -386.899, y = -105.675, z = 37.683},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
},
VehicleDelivery = {
Pos = {x = -382.925, y = -133.748, z = 37.685},
Size = {x = 20.0, y = 20.0, z = 3.0},
Color = {r = 204, g = 204, b = 0},
Type = -1
},
VehicleDeleter = {
Pos = { x = -386.899, y = -105.675, z = 37.683 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = 1,
},
VehicleDelivery = {
Pos = { x = -382.925, y = -133.748, z = 37.685 },
Size = { x = 20.0, y = 20.0, z = 3.0 },
Color = { r = 204, g = 204, b = 0 },
Type = -1,
},
}
Config.Towables = {
{ ['x'] = -2480.8720703125, ['y'] = -211.96409606934, ['z'] = 17.397672653198 },
{ ['x'] = -2723.392578125, ['y'] = 13.207388877869, ['z'] = 15.12806892395 },
{ ['x'] = -3169.6235351563, ['y'] = 976.18127441406, ['z'] = 15.038360595703 },
{ ['x'] = -3139.7568359375, ['y'] = 1078.7182617188, ['z'] = 20.189767837524 },
{ ['x'] = -1656.9357910156, ['y'] = -246.16479492188, ['z'] = 54.510955810547 },
{ ['x'] = -1586.6560058594, ['y'] = -647.56115722656, ['z'] = 29.441320419312 },
{ ['x'] = -1036.1470947266, ['y'] = -491.05856323242, ['z'] = 36.214912414551 },
{ ['x'] = -1029.1884765625, ['y'] = -475.53167724609, ['z'] = 36.416831970215 },
{ ['x'] = 75.212287902832, ['y'] = 164.8522644043, ['z'] = 104.69123077393 },
{ ['x'] = -534.60491943359, ['y'] = -756.71801757813, ['z'] = 31.599143981934 },
{ ['x'] = 487.24212646484, ['y'] = -30.827201843262, ['z'] = 88.856712341309 },
{ ['x'] = -772.20111083984, ['y'] = -1281.8114013672, ['z'] = 4.5642876625061 },
{ ['x'] = -663.84173583984, ['y'] = -1206.9936523438, ['z'] = 10.171216011047 },
{ ['x'] = 719.12451171875, ['y'] = -767.77545166016, ['z'] = 24.892364501953 },
{ ['x'] = -970.95465087891, ['y'] = -2410.4453125, ['z'] = 13.344270706177 },
{ ['x'] = -1067.5234375, ['y'] = -2571.4064941406, ['z'] = 13.211874008179 },
{ ['x'] = -619.23968505859, ['y'] = -2207.2927246094, ['z'] = 5.5659561157227 },
{ ['x'] = 1192.0831298828, ['y'] = -1336.9086914063, ['z'] = 35.106426239014 },
{ ['x'] = -432.81033325195, ['y'] = -2166.0505371094, ['z'] = 9.8885231018066 },
{ ['x'] = -451.82403564453, ['y'] = -2269.34765625, ['z'] = 7.1719741821289 },
{ ['x'] = 939.26702880859, ['y'] = -2197.5390625, ['z'] = 30.546691894531 },
{ ['x'] = -556.11486816406, ['y'] = -1794.7312011719, ['z'] = 22.043060302734 },
{ ['x'] = 591.73504638672, ['y'] = -2628.2197265625, ['z'] = 5.5735430717468 },
{ ['x'] = 1654.515625, ['y'] = -2535.8325195313, ['z'] = 74.491394042969 },
{ ['x'] = 1642.6146240234, ['y'] = -2413.3159179688, ['z'] = 93.139915466309 },
{ ['x'] = 1371.3223876953, ['y'] = -2549.525390625, ['z'] = 47.575256347656 },
{ ['x'] = 383.83779907227, ['y'] = -1652.8695068359, ['z'] = 37.278503417969 },
{ ['x'] = 27.219129562378, ['y'] = -1030.8818359375, ['z'] = 29.414621353149 },
{ ['x'] = 229.26435852051, ['y'] = -365.91101074219, ['z'] = 43.750762939453 },
{ ['x'] = -85.809432983398, ['y'] = -51.665500640869, ['z'] = 61.10591506958 },
{ ['x'] = -4.5967531204224, ['y'] = -670.27124023438, ['z'] = 31.85863494873 },
{ ['x'] = -111.89884185791, ['y'] = 91.96940612793, ['z'] = 71.080169677734 },
{ ['x'] = -314.26129150391, ['y'] = -698.23309326172, ['z'] = 32.545776367188 },
{ ['x'] = -366.90979003906, ['y'] = 115.53963470459, ['z'] = 65.575706481934 },
{ ['x'] = -592.06726074219, ['y'] = 138.20733642578, ['z'] = 60.074813842773 },
{ ['x'] = -1613.8572998047, ['y'] = 18.759860992432, ['z'] = 61.799819946289 },
{ ['x'] = -1709.7995605469, ['y'] = 55.105819702148, ['z'] = 65.706237792969 },
{ ['x'] = -521.88830566406, ['y'] = -266.7805480957, ['z'] = 34.940990447998 },
{ ['x'] = -451.08666992188, ['y'] = -333.52026367188, ['z'] = 34.021533966064 },
{ ['x'] = 322.36480712891, ['y'] = -1900.4990234375, ['z'] = 25.773607254028 },
{ ['x'] = -2480.8720703125, ['y'] = -211.96409606934, ['z'] = 17.397672653198 },
{ ['x'] = -2723.392578125, ['y'] = 13.207388877869, ['z'] = 15.12806892395 },
{ ['x'] = -3169.6235351563, ['y'] = 976.18127441406, ['z'] = 15.038360595703 },
{ ['x'] = -3139.7568359375, ['y'] = 1078.7182617188, ['z'] = 20.189767837524 },
{ ['x'] = -1656.9357910156, ['y'] = -246.16479492188, ['z'] = 54.510955810547 },
{ ['x'] = -1586.6560058594, ['y'] = -647.56115722656, ['z'] = 29.441320419312 },
{ ['x'] = -1036.1470947266, ['y'] = -491.05856323242, ['z'] = 36.214912414551 },
{ ['x'] = -1029.1884765625, ['y'] = -475.53167724609, ['z'] = 36.416831970215 },
{ ['x'] = 75.212287902832, ['y'] = 164.8522644043, ['z'] = 104.69123077393 },
{ ['x'] = -534.60491943359, ['y'] = -756.71801757813, ['z'] = 31.599143981934 },
{ ['x'] = 487.24212646484, ['y'] = -30.827201843262, ['z'] = 88.856712341309 },
{ ['x'] = -772.20111083984, ['y'] = -1281.8114013672, ['z'] = 4.5642876625061 },
{ ['x'] = -663.84173583984, ['y'] = -1206.9936523438, ['z'] = 10.171216011047 },
{ ['x'] = 719.12451171875, ['y'] = -767.77545166016, ['z'] = 24.892364501953 },
{ ['x'] = -970.95465087891, ['y'] = -2410.4453125, ['z'] = 13.344270706177 },
{ ['x'] = -1067.5234375, ['y'] = -2571.4064941406, ['z'] = 13.211874008179 },
{ ['x'] = -619.23968505859, ['y'] = -2207.2927246094, ['z'] = 5.5659561157227 },
{ ['x'] = 1192.0831298828, ['y'] = -1336.9086914063, ['z'] = 35.106426239014 },
{ ['x'] = -432.81033325195, ['y'] = -2166.0505371094, ['z'] = 9.8885231018066 },
{ ['x'] = -451.82403564453, ['y'] = -2269.34765625, ['z'] = 7.1719741821289 },
{ ['x'] = 939.26702880859, ['y'] = -2197.5390625, ['z'] = 30.546691894531 },
{ ['x'] = -556.11486816406, ['y'] = -1794.7312011719, ['z'] = 22.043060302734 },
{ ['x'] = 591.73504638672, ['y'] = -2628.2197265625, ['z'] = 5.5735430717468 },
{ ['x'] = 1654.515625, ['y'] = -2535.8325195313, ['z'] = 74.491394042969 },
{ ['x'] = 1642.6146240234, ['y'] = -2413.3159179688, ['z'] = 93.139915466309 },
{ ['x'] = 1371.3223876953, ['y'] = -2549.525390625, ['z'] = 47.575256347656 },
{ ['x'] = 383.83779907227, ['y'] = -1652.8695068359, ['z'] = 37.278503417969 },
{ ['x'] = 27.219129562378, ['y'] = -1030.8818359375, ['z'] = 29.414621353149 },
{ ['x'] = 229.26435852051, ['y'] = -365.91101074219, ['z'] = 43.750762939453 },
{ ['x'] = -85.809432983398, ['y'] = -51.665500640869, ['z'] = 61.10591506958 },
{ ['x'] = -4.5967531204224, ['y'] = -670.27124023438, ['z'] = 31.85863494873 },
{ ['x'] = -111.89884185791, ['y'] = 91.96940612793, ['z'] = 71.080169677734 },
{ ['x'] = -314.26129150391, ['y'] = -698.23309326172, ['z'] = 32.545776367188 },
{ ['x'] = -366.90979003906, ['y'] = 115.53963470459, ['z'] = 65.575706481934 },
{ ['x'] = -592.06726074219, ['y'] = 138.20733642578, ['z'] = 60.074813842773 },
{ ['x'] = -1613.8572998047, ['y'] = 18.759860992432, ['z'] = 61.799819946289 },
{ ['x'] = -1709.7995605469, ['y'] = 55.105819702148, ['z'] = 65.706237792969 },
{ ['x'] = -521.88830566406, ['y'] = -266.7805480957, ['z'] = 34.940990447998 },
{ ['x'] = -451.08666992188, ['y'] = -333.52026367188, ['z'] = 34.021533966064 },
{ ['x'] = 322.36480712891, ['y'] = -1900.4990234375, ['z'] = 25.773607254028 },
}
for i=1, #Config.Towables, 1 do
Config.Zones['Towable' .. i] = {
Pos = Config.Towables[i],
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = -1
}
Config.Zones['Towable' .. i] = {
Pos = Config.Towables[i],
Size = { x = 1.5, y = 1.5, z = 1.0 },
Color = { r = 204, g = 204, b = 0 },
Type = -1
}
end
Config.Vehicles = {
'adder',
'asea',
'asterope',
'banshee',
'buffalo'
'adder',
'asea',
'asterope',
'banshee',
'buffalo'
}
+7 -7
View File
@@ -21,10 +21,10 @@ INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_
;
INSERT INTO `items` (name, label) VALUES
('gazbottle', 'bouteille de gaz'),
('fixtool', 'outils réparation'),
('carotool', 'outils carosserie'),
('blowpipe', 'Chalumeaux'),
('fixkit', 'Kit réparation'),
('carokit', 'Kit carosserie')
;
('gazbottle', 'bouteille de gaz'),
('fixtool', 'outils réparation'),
('carotool', 'outils carosserie'),
('blowpipe', 'Chalumeaux'),
('fixkit', 'Kit réparation'),
('carokit', 'Kit carosserie')
;
+80 -81
View File
@@ -1,83 +1,82 @@
Locales['en'] = {
['mechanic'] = 'mechanic',
['drive_to_indicated'] = '~y~Drive~s~ to the indicated location.',
['mission_canceled'] = 'Mission ~r~canceled~s~',
['vehicle_list'] = 'vehicle List',
['work_wear'] = 'workwear',
['civ_wear'] = 'civilian clothes',
['deposit_stock'] = 'deposit Stock',
['withdraw_stock'] = 'withdraw Stock',
['boss_actions'] = 'boss Actions',
['service_vehicle'] = 'service Vehicle',
['flat_bed'] = 'flatbed',
['tow_truck'] = 'tow Truck',
['service_full'] = 'service full: ',
['open_actions'] = 'Press ~INPUT_CONTEXT~ to access the menu.',
['harvest'] = 'harvest',
['harvest_menu'] = 'press ~INPUT_CONTEXT~ to access the harvest menu.',
['not_experienced_enough'] = 'you are not ~r~experienced enough~s~ to perform this action.',
['gas_can'] = 'gas Can',
['repair_tools'] = 'repair Tools',
['body_work_tools'] = 'bodywork Tools',
['blowtorch'] = 'blowtorch',
['repair_kit'] = 'repair Kit',
['body_kit'] = 'body Kit',
['craft'] = 'craft',
['craft_menu'] = 'press ~INPUT_CONTEXT~ to access the crafting menu.',
['billing'] = 'billing',
['hijack'] = 'hijack',
['repair'] = 'repair',
['clean'] = 'clean',
['imp_veh'] = 'impound',
['place_objects'] = 'place Objects',
['invoice_amount'] = 'invoice Amount',
['amount_invalid'] = 'invalid amount',
['no_players_nearby'] = 'no players nearby',
['vehicle_unlocked'] = 'vehicle ~g~Unlocked',
['vehicle_repaired'] = 'vehicle ~g~Repaired',
['vehicle_cleaned'] = 'vehicle ~g~cleaned',
['vehicle_impounded'] = 'vehicle ~r~Impounded',
['must_seat_driver'] = 'you must be seated on the ~r~driver\'s side!',
['must_near'] = 'you must be ~r~near a vehicle~s~ to impound it.',
['vehicle_success_attached'] = 'vehicle successfully ~b~attached~s~!.',
['please_drop_off'] = 'please drop off the vehicle at the dealership',
['cant_attach_own_tt'] = '~r~you can\'t~s~ attach own tow truck',
['no_veh_att'] = 'there is no ~r~vehicle~s~ to be attached',
['not_right_veh'] = 'this is not the right vehicle',
['veh_det_succ'] = 'vehicle successfully ~b~dettached~s~!',
['imp_flatbed'] = '~r~Action impossible!~s~ You need a ~b~Flatbed~s~ for it',
['objects'] = 'objects',
['roadcone'] = 'roadcone',
['toolbox'] = 'toolbox',
['mechanic_stock'] = 'mechanic Stock',
['quantity'] = 'quantity',
['invalid_quantity'] = 'invalid quantity',
['inventory'] = 'inventory',
['veh_unlocked'] = '~g~Vehicle Unlocked',
['hijack_failed'] = '~r~Hijack Failed',
['body_repaired'] = '~g~Body repaired',
['veh_repaired'] = '~g~Vehicle Repaired',
['veh_stored'] = 'press ~INPUT_CONTEXT~ to store the vehicle.',
['press_remove_obj'] = 'press ~INPUT_CONTEXT~ to remove the object',
['please_tow'] = 'please ~y~tow~s~ the vehicle',
['wait_five'] = 'you must ~r~wait~s~ 5 mintes',
['must_in_flatbed'] = 'you must be in a flatbed to being the mission',
['mechanic_customer'] = 'mechanic Customer',
['you_do_not_room'] = '~r~You do not have more room',
['recovery_gas_can'] = '~b~Gas Can~s~ Retrieval...',
['recovery_repair_tools'] = '~b~Repair Tools~s~ Retrieval...',
['recovery_body_tools'] = '~b~Body Tools~s~ Retrieval...',
['not_enough_gas_can'] = 'You do not ~r~have enough~s~ gas cans.',
['assembling_blowtorch'] = 'Assembling ~b~Blowtorch~s~...',
['not_enough_repair_tools'] = 'You do not ~r~have enough~s~ repair tools.',
['assembling_repair_kit'] = 'Assembling ~b~Repair Kit~s~...',
['not_enough_body_tools'] = 'You do not ~r~have enough~s~ body tools.',
['assembling_body_kit'] = 'Assembling ~b~Body Kit~s~...',
['your_comp_earned'] = 'your company has ~g~earned~s~ ~g~$',
['you_used_blowtorch'] = 'you used a ~b~blowtorch',
['you_used_repair_kit'] = 'you used a ~b~Repair Kit',
['you_used_body_kit'] = 'you used a ~b~Body Kit',
['you_removed'] = 'you have removed x',
['you_added'] = 'you have added x',
['mechanic'] = 'mechanic',
['drive_to_indicated'] = '~y~Drive~s~ to the indicated location.',
['mission_canceled'] = 'Mission ~r~canceled~s~',
['vehicle_list'] = 'vehicle List',
['work_wear'] = 'workwear',
['civ_wear'] = 'civilian clothes',
['deposit_stock'] = 'deposit Stock',
['withdraw_stock'] = 'withdraw Stock',
['boss_actions'] = 'boss Actions',
['service_vehicle'] = 'service Vehicle',
['flat_bed'] = 'flatbed',
['tow_truck'] = 'tow Truck',
['service_full'] = 'service full: ',
['open_actions'] = 'Press ~INPUT_CONTEXT~ to access the menu.',
['harvest'] = 'harvest',
['harvest_menu'] = 'press ~INPUT_CONTEXT~ to access the harvest menu.',
['not_experienced_enough'] = 'you are not ~r~experienced enough~s~ to perform this action.',
['gas_can'] = 'gas Can',
['repair_tools'] = 'repair Tools',
['body_work_tools'] = 'bodywork Tools',
['blowtorch'] = 'blowtorch',
['repair_kit'] = 'repair Kit',
['body_kit'] = 'body Kit',
['craft'] = 'craft',
['craft_menu'] = 'press ~INPUT_CONTEXT~ to access the crafting menu.',
['billing'] = 'billing',
['hijack'] = 'hijack',
['repair'] = 'repair',
['clean'] = 'clean',
['imp_veh'] = 'impound',
['place_objects'] = 'place Objects',
['invoice_amount'] = 'invoice Amount',
['amount_invalid'] = 'invalid amount',
['no_players_nearby'] = 'no players nearby',
['vehicle_unlocked'] = 'vehicle ~g~Unlocked',
['vehicle_repaired'] = 'vehicle ~g~Repaired',
['vehicle_cleaned'] = 'vehicle ~g~cleaned',
['vehicle_impounded'] = 'vehicle ~r~Impounded',
['must_seat_driver'] = 'you must be seated on the ~r~driver\'s side!',
['must_near'] = 'you must be ~r~near a vehicle~s~ to impound it.',
['vehicle_success_attached'] = 'vehicle successfully ~b~attached~s~!.',
['please_drop_off'] = 'please drop off the vehicle at the dealership',
['cant_attach_own_tt'] = '~r~you can\'t~s~ attach own tow truck',
['no_veh_att'] = 'there is no ~r~vehicle~s~ to be attached',
['not_right_veh'] = 'this is not the right vehicle',
['veh_det_succ'] = 'vehicle successfully ~b~dettached~s~!',
['imp_flatbed'] = '~r~Action impossible!~s~ You need a ~b~Flatbed~s~ for it',
['objects'] = 'objects',
['roadcone'] = 'roadcone',
['toolbox'] = 'toolbox',
['mechanic_stock'] = 'mechanic Stock',
['quantity'] = 'quantity',
['invalid_quantity'] = 'invalid quantity',
['inventory'] = 'inventory',
['veh_unlocked'] = '~g~Vehicle Unlocked',
['hijack_failed'] = '~r~Hijack Failed',
['body_repaired'] = '~g~Body repaired',
['veh_repaired'] = '~g~Vehicle Repaired',
['veh_stored'] = 'press ~INPUT_CONTEXT~ to store the vehicle.',
['press_remove_obj'] = 'press ~INPUT_CONTEXT~ to remove the object',
['please_tow'] = 'please ~y~tow~s~ the vehicle',
['wait_five'] = 'you must ~r~wait~s~ 5 mintes',
['must_in_flatbed'] = 'you must be in a flatbed to being the mission',
['mechanic_customer'] = 'mechanic Customer',
['you_do_not_room'] = '~r~You do not have more room',
['recovery_gas_can'] = '~b~Gas Can~s~ Retrieval...',
['recovery_repair_tools'] = '~b~Repair Tools~s~ Retrieval...',
['recovery_body_tools'] = '~b~Body Tools~s~ Retrieval...',
['not_enough_gas_can'] = 'You do not ~r~have enough~s~ gas cans.',
['assembling_blowtorch'] = 'Assembling ~b~Blowtorch~s~...',
['not_enough_repair_tools'] = 'You do not ~r~have enough~s~ repair tools.',
['assembling_repair_kit'] = 'Assembling ~b~Repair Kit~s~...',
['not_enough_body_tools'] = 'You do not ~r~have enough~s~ body tools.',
['assembling_body_kit'] = 'Assembling ~b~Body Kit~s~...',
['your_comp_earned'] = 'your company has ~g~earned~s~ ~g~$',
['you_used_blowtorch'] = 'you used a ~b~blowtorch',
['you_used_repair_kit'] = 'you used a ~b~Repair Kit',
['you_used_body_kit'] = 'you used a ~b~Body Kit',
['you_removed'] = 'you have removed x',
['you_added'] = 'you have added x',
}
+80 -81
View File
@@ -1,83 +1,82 @@
Locales['fr'] = {
['mechanic'] = 'mecano',
['drive_to_indicated'] = '~y~Conduisez~s~ jusqu\'à l\'endroit indiqué',
['mission_canceled'] = 'Mission ~r~annulée~s~',
['vehicle_list'] = 'sortir Véhicule',
['work_wear'] = 'tenue de travail',
['civ_wear'] = 'Tenue civile',
['deposit_stock'] = 'Déposer Stock',
['withdraw_stock'] = 'Prendre Stock',
['boss_actions'] = 'action Patron',
['service_vehicle'] = 'Véhicule de service',
['flat_bed'] = 'plateau',
['tow_truck'] = 'dépaneuse',
['service_full'] = 'service complet : ',
['open_actions'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au menu.',
['harvest'] = 'récolte',
['harvest_menu'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au menu de récolte.',
['not_experienced_enough'] = 'Vous n\'êtes ~r~pas assez expérimenté~s~ pour effectuer cette action.',
['gas_can'] = 'Bouteille de gaz',
['repair_tools'] = 'Outils réparation',
['body_work_tools'] = 'Outils Carosserie',
['blowtorch'] = 'chalumeaux',
['repair_kit'] = 'kit Réparation',
['body_kit'] = 'kit Carosserie',
['craft'] = 'etabli',
['craft_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu établi.',
['billing'] = 'facturation',
['hijack'] = 'crocheter',
['repair'] = 'réparer',
['clean'] = 'nettoyer',
['impound'] = 'fourrière',
['place_objects'] = 'placer objets',
['invoice_amount'] = 'montant de la facture',
['amount_invalid'] = 'montant invalide',
['no_players_nearby'] = 'aucun joueur à proximité',
['vehicle_unlocked'] = 'véhicule ~g~déverouillé',
['vehicle_repaired'] = 'véhicule ~g~réparé',
['vehicle_cleaned'] = 'véhicule ~g~néttoyé',
['vehicle_impounded'] = 'vehicule ~r~mis en fourrière',
['must_seat_driver'] = 'vous devez être assis du ~r~côté conducteur!',
['must_near'] = 'vous devez être ~r~près d\'un véhicule~s~ pour le mettre en fourrière',
['vehicle_success_attached'] = 'vehicule ~b~attaché~s~ avec succès!',
['please_drop_off'] = 'veuillez déposer le véhicule à la concession',
['cant_attach_own_tt'] = '~r~Impossible~s~ d\'attacher votre propre dépanneuse',
['no_veh_att'] = 'il n\'y a ~r~pas de véhicule~s~ à attacher',
['not_right_veh'] = 'ce n\'est pas le bon véhicule',
['veh_det_succ'] = 'vehicule ~b~détattaché~s~ avec succès!',
['imp_flatbed'] = '~r~Impossible! ~s~Vous devez avoir un ~b~Flatbed ~s~pour ça',
['objects'] = 'objets',
['roadcone'] = 'plot',
['toolbox'] = 'boîte à outils',
['mechanic_stock'] = 'mecano Stock',
['quantity'] = 'quantité',
['invalid_quantity'] = 'quantité invalide',
['inventory'] = 'inventaire',
['veh_unlocked'] = '~g~Véhicule déverouillé',
['hijack_failed'] = '~r~Crochetage raté',
['body_repaired'] = '~g~Carosserie réparée',
['veh_repaired'] = '~g~Véhicule réparé',
['veh_stored'] = 'appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule.',
['press_remove_obj'] = 'appuyez sur ~INPUT_CONTEXT~ pour enlever l\'object',
['please_tow'] = 'veuillez ~y~remorquer~s~ le véhicule',
['wait_five'] = 'Vous devez ~r~attendre~s~ 5 minutes',
['must_in_flatbed'] = 'Vous devez être en flatbed pour commencer la mission',
['mechanic_customer'] = 'client mecano',
['you_do_not_room'] = '~r~Vous n\'avez plus de place',
['recovery_gas_can'] = 'Récupération de ~b~bouteille de gaz~s~...',
['recovery_repair_tools'] = 'Récupération d\'~b~Outils réparation~s~...',
['recovery_body_tools'] = 'Récupération d\'~b~Outils carosserie~s~...',
['not_enough_gas_can'] = 'Vous n\'avez ~r~pas assez~s~ de bouteille de gaz',
['assembling_blowtorch'] = 'Assemblage de ~b~Chalumeaux~s~...',
['not_enough_repair_tools'] = 'Vous n\'avez ~r~pas assez~s~ d\'outils réparation',
['assembling_blowtorch'] = 'Assemblage de ~b~Kit réparation~s~...',
['not_enough_body_tools'] = 'Vous n\'avez ~r~pas assez~s~ d\'outils carosserie',
['assembling_body_kit'] = 'Assemblage de ~b~kit carosserie~s~...',
['your_comp_earned'] = 'Votre société a ~g~gagné~s~ ~g~$',
['you_used_blowtorch'] = 'Vous avez utilisé un ~b~Chalumeau',
['you_used_repair_kit'] = 'Vous avez utilisé un ~b~Kit de réparation',
['you_used_body_kit'] = 'Vous avez utilisé un ~b~Kit de carosserie',
['you_removed'] = 'vous avez retiré x',
['you_added'] = 'Vous avez ajouté x',
['mechanic'] = 'mecano',
['drive_to_indicated'] = '~y~Conduisez~s~ jusqu\'à l\'endroit indiqué',
['mission_canceled'] = 'Mission ~r~annulée~s~',
['vehicle_list'] = 'sortir Véhicule',
['work_wear'] = 'tenue de travail',
['civ_wear'] = 'Tenue civile',
['deposit_stock'] = 'Déposer Stock',
['withdraw_stock'] = 'Prendre Stock',
['boss_actions'] = 'action Patron',
['service_vehicle'] = 'Véhicule de service',
['flat_bed'] = 'plateau',
['tow_truck'] = 'dépaneuse',
['service_full'] = 'service complet : ',
['open_actions'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au menu.',
['harvest'] = 'récolte',
['harvest_menu'] = 'Appuyez sur ~INPUT_CONTEXT~ pour accéder au menu de récolte.',
['not_experienced_enough'] = 'Vous n\'êtes ~r~pas assez expérimenté~s~ pour effectuer cette action.',
['gas_can'] = 'Bouteille de gaz',
['repair_tools'] = 'Outils réparation',
['body_work_tools'] = 'Outils Carosserie',
['blowtorch'] = 'chalumeaux',
['repair_kit'] = 'kit Réparation',
['body_kit'] = 'kit Carosserie',
['craft'] = 'etabli',
['craft_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu établi.',
['billing'] = 'facturation',
['hijack'] = 'crocheter',
['repair'] = 'réparer',
['clean'] = 'nettoyer',
['impound'] = 'fourrière',
['place_objects'] = 'placer objets',
['invoice_amount'] = 'montant de la facture',
['amount_invalid'] = 'montant invalide',
['no_players_nearby'] = 'aucun joueur à proximité',
['vehicle_unlocked'] = 'véhicule ~g~déverouillé',
['vehicle_repaired'] = 'véhicule ~g~réparé',
['vehicle_cleaned'] = 'véhicule ~g~néttoyé',
['vehicle_impounded'] = 'vehicule ~r~mis en fourrière',
['must_seat_driver'] = 'vous devez être assis du ~r~côté conducteur!',
['must_near'] = 'vous devez être ~r~près d\'un véhicule~s~ pour le mettre en fourrière',
['vehicle_success_attached'] = 'vehicule ~b~attaché~s~ avec succès!',
['please_drop_off'] = 'veuillez déposer le véhicule à la concession',
['cant_attach_own_tt'] = '~r~Impossible~s~ d\'attacher votre propre dépanneuse',
['no_veh_att'] = 'il n\'y a ~r~pas de véhicule~s~ à attacher',
['not_right_veh'] = 'ce n\'est pas le bon véhicule',
['veh_det_succ'] = 'vehicule ~b~détattaché~s~ avec succès!',
['imp_flatbed'] = '~r~Impossible! ~s~Vous devez avoir un ~b~Flatbed ~s~pour ça',
['objects'] = 'objets',
['roadcone'] = 'plot',
['toolbox'] = 'boîte à outils',
['mechanic_stock'] = 'mecano Stock',
['quantity'] = 'quantité',
['invalid_quantity'] = 'quantité invalide',
['inventory'] = 'inventaire',
['veh_unlocked'] = '~g~Véhicule déverouillé',
['hijack_failed'] = '~r~Crochetage raté',
['body_repaired'] = '~g~Carosserie réparée',
['veh_repaired'] = '~g~Véhicule réparé',
['veh_stored'] = 'appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule.',
['press_remove_obj'] = 'appuyez sur ~INPUT_CONTEXT~ pour enlever l\'object',
['please_tow'] = 'veuillez ~y~remorquer~s~ le véhicule',
['wait_five'] = 'Vous devez ~r~attendre~s~ 5 minutes',
['must_in_flatbed'] = 'Vous devez être en flatbed pour commencer la mission',
['mechanic_customer'] = 'client mecano',
['you_do_not_room'] = '~r~Vous n\'avez plus de place',
['recovery_gas_can'] = 'Récupération de ~b~bouteille de gaz~s~...',
['recovery_repair_tools'] = 'Récupération d\'~b~Outils réparation~s~...',
['recovery_body_tools'] = 'Récupération d\'~b~Outils carosserie~s~...',
['not_enough_gas_can'] = 'Vous n\'avez ~r~pas assez~s~ de bouteille de gaz',
['assembling_blowtorch'] = 'Assemblage de ~b~Chalumeaux~s~...',
['not_enough_repair_tools'] = 'Vous n\'avez ~r~pas assez~s~ d\'outils réparation',
['assembling_blowtorch'] = 'Assemblage de ~b~Kit réparation~s~...',
['not_enough_body_tools'] = 'Vous n\'avez ~r~pas assez~s~ d\'outils carosserie',
['assembling_body_kit'] = 'Assemblage de ~b~kit carosserie~s~...',
['your_comp_earned'] = 'Votre société a ~g~gagné~s~ ~g~$',
['you_used_blowtorch'] = 'Vous avez utilisé un ~b~Chalumeau',
['you_used_repair_kit'] = 'Vous avez utilisé un ~b~Kit de réparation',
['you_used_body_kit'] = 'Vous avez utilisé un ~b~Kit de carosserie',
['you_removed'] = 'vous avez retiré x',
['you_added'] = 'Vous avez ajouté x',
}
+6 -6
View File
@@ -21,10 +21,10 @@ INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_
;
INSERT INTO `items` (name, label) VALUES
('gazbottle', 'Gas Bottle'),
('fixtool', 'Repair Tools'),
('carotool', 'Tools'),
('blowpipe', 'Blowtorch'),
('fixkit', 'Repair Kit'),
('carokit', 'Body Kit')
('gazbottle', 'Gas Bottle'),
('fixtool', 'Repair Tools'),
('carotool', 'Tools'),
('blowpipe', 'Blowtorch'),
('fixkit', 'Repair Kit'),
('carokit', 'Body Kit')
;
+151 -151
View File
@@ -9,7 +9,7 @@ PlayersCrafting3 = {}
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
if Config.MaxInService ~= -1 then
TriggerEvent('esx_service:activateService', 'mecano', Config.MaxInService)
TriggerEvent('esx_service:activateService', 'mecano', Config.MaxInService)
end
TriggerEvent('esx_phone:registerNumber', 'mecano', _U('mechanic_customer'), true, true)
@@ -19,205 +19,205 @@ TriggerEvent('esx_society:registerSociety', 'mecano', 'Mecano', 'society_mecano'
---- Sqlut je teste ------
local function Harvest(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersHarvesting[source] == true then
if PlayersHarvesting[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count
local xPlayer = ESX.GetPlayerFromId(source)
local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count
if GazBottleQuantity >= 5 then
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
if GazBottleQuantity >= 5 then
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
xPlayer.addInventoryItem('gazbottle', 1)
Harvest(source)
end
end
end)
Harvest(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startHarvest')
AddEventHandler('esx_mecanojob:startHarvest', function()
local _source = source
PlayersHarvesting[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_gas_can'))
Harvest(source)
local _source = source
PlayersHarvesting[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_gas_can'))
Harvest(source)
end)
RegisterServerEvent('esx_mecanojob:stopHarvest')
AddEventHandler('esx_mecanojob:stopHarvest', function()
local _source = source
PlayersHarvesting[_source] = false
local _source = source
PlayersHarvesting[_source] = false
end)
------------ Récupération Outils Réparation --------------
local function Harvest2(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersHarvesting2[source] == true then
if PlayersHarvesting2[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count
if FixToolQuantity >= 5 then
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
local xPlayer = ESX.GetPlayerFromId(source)
local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count
if FixToolQuantity >= 5 then
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
xPlayer.addInventoryItem('fixtool', 1)
Harvest2(source)
end
end
end)
Harvest2(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startHarvest2')
AddEventHandler('esx_mecanojob:startHarvest2', function()
local _source = source
PlayersHarvesting2[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_repair_tools'))
Harvest2(_source)
local _source = source
PlayersHarvesting2[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_repair_tools'))
Harvest2(_source)
end)
RegisterServerEvent('esx_mecanojob:stopHarvest2')
AddEventHandler('esx_mecanojob:stopHarvest2', function()
local _source = source
PlayersHarvesting2[_source] = false
local _source = source
PlayersHarvesting2[_source] = false
end)
----------------- Récupération Outils Carosserie ----------------
local function Harvest3(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersHarvesting3[source] == true then
if PlayersHarvesting3[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count
local xPlayer = ESX.GetPlayerFromId(source)
local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count
if CaroToolQuantity >= 5 then
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
TriggerClientEvent('esx:showNotification', source, _U('you_do_not_room'))
else
xPlayer.addInventoryItem('carotool', 1)
Harvest3(source)
end
end
end)
Harvest3(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startHarvest3')
AddEventHandler('esx_mecanojob:startHarvest3', function()
local _source = source
PlayersHarvesting3[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_body_tools'))
Harvest3(_source)
local _source = source
PlayersHarvesting3[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('recovery_body_tools'))
Harvest3(_source)
end)
RegisterServerEvent('esx_mecanojob:stopHarvest3')
AddEventHandler('esx_mecanojob:stopHarvest3', function()
local _source = source
PlayersHarvesting3[_source] = false
local _source = source
PlayersHarvesting3[_source] = false
end)
------------ Craft Chalumeau -------------------
local function Craft(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersCrafting[source] == true then
if PlayersCrafting[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count
local xPlayer = ESX.GetPlayerFromId(source)
local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count
if GazBottleQuantity <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough_gas_can'))
else
if GazBottleQuantity <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough_gas_can'))
else
xPlayer.removeInventoryItem('gazbottle', 1)
xPlayer.addInventoryItem('blowpipe', 1)
Craft(source)
end
end
end)
Craft(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startCraft')
AddEventHandler('esx_mecanojob:startCraft', function()
local _source = source
PlayersCrafting[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_blowtorch'))
Craft(_source)
local _source = source
PlayersCrafting[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_blowtorch'))
Craft(_source)
end)
RegisterServerEvent('esx_mecanojob:stopCraft')
AddEventHandler('esx_mecanojob:stopCraft', function()
local _source = source
PlayersCrafting[_source] = false
local _source = source
PlayersCrafting[_source] = false
end)
------------ Craft kit Réparation --------------
local function Craft2(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersCrafting2[source] == true then
if PlayersCrafting2[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count
if FixToolQuantity <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough_repair_tools'))
else
local xPlayer = ESX.GetPlayerFromId(source)
local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count
if FixToolQuantity <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough_repair_tools'))
else
xPlayer.removeInventoryItem('fixtool', 1)
xPlayer.addInventoryItem('fixkit', 1)
Craft2(source)
end
end
end)
Craft2(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startCraft2')
AddEventHandler('esx_mecanojob:startCraft2', function()
local _source = source
PlayersCrafting2[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_blowtorch'))
Craft2(_source)
local _source = source
PlayersCrafting2[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_blowtorch'))
Craft2(_source)
end)
RegisterServerEvent('esx_mecanojob:stopCraft2')
AddEventHandler('esx_mecanojob:stopCraft2', function()
local _source = source
PlayersCrafting2[_source] = false
local _source = source
PlayersCrafting2[_source] = false
end)
----------------- Craft kit Carosserie ----------------
local function Craft3(source)
SetTimeout(4000, function()
SetTimeout(4000, function()
if PlayersCrafting3[source] == true then
if PlayersCrafting3[source] == true then
local xPlayer = ESX.GetPlayerFromId(source)
local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count
local xPlayer = ESX.GetPlayerFromId(source)
local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count
if CaroToolQuantity <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough_body_tools'))
else
TriggerClientEvent('esx:showNotification', source, _U('not_enough_body_tools'))
else
xPlayer.removeInventoryItem('carotool', 1)
xPlayer.addInventoryItem('carokit', 1)
Craft3(source)
end
end
end)
Craft3(source)
end
end
end)
end
RegisterServerEvent('esx_mecanojob:startCraft3')
AddEventHandler('esx_mecanojob:startCraft3', function()
local _source = source
PlayersCrafting3[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_body_kit'))
Craft3(_source)
local _source = source
PlayersCrafting3[_source] = true
TriggerClientEvent('esx:showNotification', _source, _U('assembling_body_kit'))
Craft3(_source)
end)
RegisterServerEvent('esx_mecanojob:stopCraft3')
AddEventHandler('esx_mecanojob:stopCraft3', function()
local _source = source
PlayersCrafting3[_source] = false
local _source = source
PlayersCrafting3[_source] = false
end)
---------------------------- NPC Job Earnings ------------------------------------------------------
@@ -225,55 +225,55 @@ end)
RegisterServerEvent('esx_mecanojob:onNPCJobMissionCompleted')
AddEventHandler('esx_mecanojob:onNPCJobMissionCompleted', function()
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local total = math.random(Config.NPCJobEarnings.min, Config.NPCJobEarnings.max);
if xPlayer.job.grade >= 3 then
total = total * 2
total = total * 2
end
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_mecano', function(account)
account.addMoney(total)
account.addMoney(total)
end)
TriggerClientEvent("esx:showNotification", _source, _U('your_comp_earned').. total)
TriggerClientEvent("esx:showNotification", _source, _U('your_comp_earned').. total)
end)
---------------------------- register usable item --------------------------------------------------
ESX.RegisterUsableItem('blowpipe', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('blowpipe', 1)
xPlayer.removeInventoryItem('blowpipe', 1)
TriggerClientEvent('esx_mecanojob:onHijack', _source)
TriggerClientEvent('esx_mecanojob:onHijack', _source)
TriggerClientEvent('esx:showNotification', _source, _U('you_used_blowtorch'))
end)
ESX.RegisterUsableItem('fixkit', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('fixkit', 1)
xPlayer.removeInventoryItem('fixkit', 1)
TriggerClientEvent('esx_mecanojob:onFixkit', _source)
TriggerClientEvent('esx_mecanojob:onFixkit', _source)
TriggerClientEvent('esx:showNotification', _source, _U('you_used_repair_kit'))
end)
ESX.RegisterUsableItem('carokit', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem('carokit', 1)
xPlayer.removeInventoryItem('carokit', 1)
TriggerClientEvent('esx_mecanojob:onCarokit', _source)
TriggerClientEvent('esx_mecanojob:onCarokit', _source)
TriggerClientEvent('esx:showNotification', _source, _U('you_used_body_kit'))
end)
@@ -285,30 +285,30 @@ end)
RegisterServerEvent('esx_mecanojob:getStockItem')
AddEventHandler('esx_mecanojob:getStockItem', function(itemName, count)
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayer = ESX.GetPlayerFromId(source)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
local item = inventory.getItem(itemName)
local item = inventory.getItem(itemName)
if item.count >= count then
inventory.removeItem(itemName, count)
xPlayer.addInventoryItem(itemName, count)
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
end
if item.count >= count then
inventory.removeItem(itemName, count)
xPlayer.addInventoryItem(itemName, count)
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
end
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_removed') .. count .. ' ' .. item.label)
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_removed') .. count .. ' ' .. item.label)
end)
end)
end)
ESX.RegisterServerCallback('esx_mecanojob:getStockItems', function(source, cb)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
cb(inventory.items)
end)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
cb(inventory.items)
end)
end)
@@ -319,40 +319,40 @@ end)
RegisterServerEvent('esx_mecanojob:putStockItems')
AddEventHandler('esx_mecanojob:putStockItems', function(itemName, count)
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayer = ESX.GetPlayerFromId(source)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mecano', function(inventory)
local item = inventory.getItem(itemName)
local item = inventory.getItem(itemName)
if item.count >= 0 then
xPlayer.removeInventoryItem(itemName, count)
inventory.addItem(itemName, count)
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
end
if item.count >= 0 then
xPlayer.removeInventoryItem(itemName, count)
inventory.addItem(itemName, count)
else
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('invalid_quantity'))
end
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_added') .. count .. ' ' .. item.label)
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('you_added') .. count .. ' ' .. item.label)
end)
end)
end)
--ESX.RegisterServerCallback('esx_mecanojob:putStockItems', function(source, cb)
-- TriggerEvent('esx_addoninventory:getSharedInventory', 'society_policestock', function(inventory)
-- cb(inventory.items)
-- end)
-- TriggerEvent('esx_addoninventory:getSharedInventory', 'society_policestock', function(inventory)
-- cb(inventory.items)
-- end)
--end)
ESX.RegisterServerCallback('esx_mecanojob:getPlayerInventory', function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
local items = xPlayer.inventory
local xPlayer = ESX.GetPlayerFromId(source)
local items = xPlayer.inventory
cb({
items = items
})
cb({
items = items
})
end)