Initial code cleanup

This commit is contained in:
ElPumpo
2019-12-07 11:22:40 +01:00
parent c62ca2e70f
commit 5a38d951e8
10 changed files with 421 additions and 536 deletions
+17 -17
View File
@@ -9,15 +9,15 @@ Config.Jobs.fisherman = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "benson", Hash = 'benson',
Trailer = "none", Trailer = 'none',
HasCaution = true HasCaution = true
}, },
Boat = { Boat = {
Spawner = 2, Spawner = 2,
Hash = "tug", Hash = 'tug',
Trailer = "none", Trailer = 'none',
HasCaution = false HasCaution = false
} }
@@ -32,7 +32,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = true, Blip = true,
Name = _U('fm_fish_locker'), Name = _U('fm_fish_locker'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U('cloak_change'), Hint = _U('cloak_change'),
GPS = {x = 880.74, y = -1663.96, z = 29.37} GPS = {x = 880.74, y = -1663.96, z = 29.37}
}, },
@@ -44,19 +44,19 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = true, Blip = true,
Name = _U('fm_fish_area'), Name = _U('fm_fish_area'),
Type = "work", Type = 'work',
Hint = _U('fm_fish_button'), Hint = _U('fm_fish_button'),
GPS = {x = 3859.43, y = 4448.83, z = 0.39}, GPS = {x = 3859.43, y = 4448.83, z = 0.39},
Item = { Item = {
{ {
name = _U('fm_fish'), name = _U('fm_fish'),
db_name= "fish", db_name= 'fish',
time = 2000, time = 2000,
max = 100, max = 100,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
@@ -70,7 +70,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = true, Blip = true,
Name = _U('fm_spawnboat_title'), Name = _U('fm_spawnboat_title'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 2, Spawner = 2,
Hint = _U('fm_spawnboat'), Hint = _U('fm_spawnboat'),
Caution = 0, Caution = 0,
@@ -83,7 +83,7 @@ Config.Jobs.fisherman = {
Marker= -1, Marker= -1,
Blip = false, Blip = false,
Name = _U('fm_boat_title'), Name = _U('fm_boat_title'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 2, Spawner = 2,
GPS = 0, GPS = 0,
Heading = 270.1 Heading = 270.1
@@ -96,7 +96,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = false, Blip = false,
Name = _U('fm_boat_return_title'), Name = _U('fm_boat_return_title'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U('fm_boat_return_button'), Hint = _U('fm_boat_return_button'),
Spawner = 2, Spawner = 2,
Caution = 0, Caution = 0,
@@ -111,7 +111,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = false, Blip = false,
Name = _U('spawn_veh'), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U('spawn_veh_button'), Hint = _U('spawn_veh_button'),
Caution = 2000, Caution = 2000,
@@ -124,7 +124,7 @@ Config.Jobs.fisherman = {
Marker= -1, Marker= -1,
Blip = false, Blip = false,
Name = _U('service_vh'), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
GPS = 0, GPS = 0,
Heading = 70.1 Heading = 70.1
@@ -137,7 +137,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = false, Blip = false,
Name = _U('return_vh'), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U('return_vh_button'), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
@@ -153,7 +153,7 @@ Config.Jobs.fisherman = {
Marker= 1, Marker= 1,
Blip = true, Blip = true,
Name = _U('delivery_point'), Name = _U('delivery_point'),
Type = "delivery", Type = 'delivery',
Spawner = 2, Spawner = 2,
Hint = _U('fm_deliver_fish'), Hint = _U('fm_deliver_fish'),
GPS = {x = 3867.44, y = 4463.62, z = 1.72}, GPS = {x = 3867.44, y = 4463.62, z = 1.72},
@@ -164,7 +164,7 @@ Config.Jobs.fisherman = {
remove = 1, remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 11, price = 11,
requires = "fish", requires = 'fish',
requires_name = _U('fm_fish'), requires_name = _U('fm_fish'),
drop = 100 drop = 100
} }
+40 -40
View File
@@ -9,8 +9,8 @@ Config.Jobs.fueler = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "phantom", Hash = 'phantom',
Trailer = "tanker", Trailer = 'tanker',
HasCaution = true HasCaution = true
} }
@@ -24,9 +24,9 @@ Config.Jobs.fueler = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("f_oil_refiner"), Name = _U('f_oil_refiner'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U("cloak_change"), Hint = _U('cloak_change'),
GPS = {x = 554.59, y = -2314.43, z = 4.86} GPS = {x = 554.59, y = -2314.43, z = 4.86}
}, },
@@ -36,22 +36,22 @@ Config.Jobs.fueler = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("f_drill_oil"), Name = _U('f_drill_oil'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("f_fuel"), name = _U('f_fuel'),
db_name = "petrol", db_name = 'petrol',
time = 5000, time = 5000,
max = 24, max = 24,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
Hint = _U("f_drillbutton"), Hint = _U('f_drillbutton'),
GPS = {x = 2736.94, y = 1417.99, z = 23.48} GPS = {x = 2736.94, y = 1417.99, z = 23.48}
}, },
@@ -61,22 +61,22 @@ Config.Jobs.fueler = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("f_fuel_refine"), Name = _U('f_fuel_refine'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("f_fuel_refine"), name = _U('f_fuel_refine'),
db_name = "petrol_raffin", db_name = 'petrol_raffin',
time = 5000, time = 5000,
max = 24, max = 24,
add = 1, add = 1,
remove = 2, remove = 2,
requires = "petrol", requires = 'petrol',
requires_name = _U("f_fuel"), requires_name = _U('f_fuel'),
drop = 100 drop = 100
} }
}, },
Hint = _U("f_refine_fuel_button"), Hint = _U('f_refine_fuel_button'),
GPS = {x = 265.75, y = -3013.39, z = 4.73} GPS = {x = 265.75, y = -3013.39, z = 4.73}
}, },
@@ -86,22 +86,22 @@ Config.Jobs.fueler = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("f_fuel_mixture"), Name = _U('f_fuel_mixture'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("f_gas"), name = _U('f_gas'),
db_name = "essence", db_name = 'essence',
time = 5000, time = 5000,
max = 24, max = 24,
add = 2, add = 2,
remove = 1, remove = 1,
requires = "petrol_raffin", requires = 'petrol_raffin',
requires_name = _U("f_fuel_refine"), requires_name = _U('f_fuel_refine'),
drop = 100 drop = 100
} }
}, },
Hint = _U("f_fuel_mixture_button"), Hint = _U('f_fuel_mixture_button'),
GPS = {x = 491.40, y = -2163.37, z = 4.91} GPS = {x = 491.40, y = -2163.37, z = 4.91}
}, },
@@ -111,10 +111,10 @@ Config.Jobs.fueler = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("spawn_veh"), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("spawn_truck_button"), Hint = _U('spawn_truck_button'),
Caution = 2000, Caution = 2000,
GPS = {x = 602.25, y = 2926.62, z = 39.68} GPS = {x = 602.25, y = 2926.62, z = 39.68}
}, },
@@ -124,8 +124,8 @@ Config.Jobs.fueler = {
Size = {x = 3.0, y = 3.0, z = 1.0}, Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
GPS = 0, GPS = 0,
Heading = 0 Heading = 0
@@ -137,9 +137,9 @@ Config.Jobs.fueler = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
@@ -152,23 +152,23 @@ Config.Jobs.fueler = {
Size = {x = 10.0, y = 10.0, z = 1.0}, Size = {x = 10.0, y = 10.0, z = 1.0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("f_deliver_gas"), Name = _U('f_deliver_gas'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 61, price = 61,
requires = "essence", requires = 'essence',
requires_name = _U("f_gas"), requires_name = _U('f_gas'),
drop = 100 drop = 100
} }
}, },
Hint = _U("f_deliver_gas_button"), Hint = _U('f_deliver_gas_button'),
GPS = {x = 609.58, y = 2856.74, z = 39.49} GPS = {x = 609.58, y = 2856.74, z = 39.49}
} }
+40 -40
View File
@@ -9,8 +9,8 @@ Config.Jobs.lumberjack = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "phantom", Hash = 'phantom',
Trailer = "trailers", Trailer = 'trailers',
HasCaution = true HasCaution = true
} }
@@ -24,9 +24,9 @@ Config.Jobs.lumberjack = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("lj_locker_room"), Name = _U('lj_locker_room'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U("cloak_change") Hint = _U('cloak_change')
}, },
Wood = { Wood = {
@@ -35,22 +35,22 @@ Config.Jobs.lumberjack = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("lj_mapblip"), Name = _U('lj_mapblip'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("lj_wood"), name = _U('lj_wood'),
db_name = "wood", db_name = 'wood',
time = 3000, time = 3000,
max = 20, max = 20,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
Hint = _U("lj_pickup") Hint = _U('lj_pickup')
}, },
CuttedWood = { CuttedWood = {
@@ -59,22 +59,22 @@ Config.Jobs.lumberjack = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("lj_cutwood"), Name = _U('lj_cutwood'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("lj_cutwood"), name = _U('lj_cutwood'),
db_name = "cutted_wood", db_name = 'cutted_wood',
time = 5000, time = 5000,
max = 20, max = 20,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "wood", requires = 'wood',
requires_name = _U("lj_wood"), requires_name = _U('lj_wood'),
drop = 100 drop = 100
} }
}, },
Hint = _U("lj_cutwood_button") Hint = _U('lj_cutwood_button')
}, },
Planks = { Planks = {
@@ -83,22 +83,22 @@ Config.Jobs.lumberjack = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("lj_board"), Name = _U('lj_board'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("lj_planks"), name = _U('lj_planks'),
db_name = "packaged_plank", db_name = 'packaged_plank',
time = 4000, time = 4000,
max = 100, max = 100,
add = 5, add = 5,
remove = 1, remove = 1,
requires = "cutted_wood", requires = 'cutted_wood',
requires_name = _U("lj_cutwood"), requires_name = _U('lj_cutwood'),
drop = 100 drop = 100
} }
}, },
Hint = _U("lj_pick_boards") Hint = _U('lj_pick_boards')
}, },
VehicleSpawner = { VehicleSpawner = {
@@ -107,10 +107,10 @@ Config.Jobs.lumberjack = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("spawn_veh"), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("spawn_veh_button"), Hint = _U('spawn_veh_button'),
Caution = 2000 Caution = 2000
}, },
@@ -119,8 +119,8 @@ Config.Jobs.lumberjack = {
Size = {x = 3.0, y = 3.0, z = 1.0}, Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
Heading = 264.40 Heading = 264.40
}, },
@@ -131,9 +131,9 @@ Config.Jobs.lumberjack = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
@@ -146,22 +146,22 @@ Config.Jobs.lumberjack = {
Size = {x = 5.0, y = 5.0, z = 3.0}, Size = {x = 5.0, y = 5.0, z = 3.0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("delivery_point"), Name = _U('delivery_point'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 13, price = 13,
requires = "packaged_plank", requires = 'packaged_plank',
requires_name = _U("lj_planks"), requires_name = _U('lj_planks'),
drop = 100 drop = 100
} }
}, },
Hint = _U("lj_deliver_button") Hint = _U('lj_deliver_button')
} }
} }
+64 -64
View File
@@ -9,8 +9,8 @@ Config.Jobs.miner = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "rubble", Hash = 'rubble',
Trailer = "none", Trailer = 'none',
HasCaution = true HasCaution = true
} }
@@ -24,9 +24,9 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_miner_locker"), Name = _U('m_miner_locker'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U("cloak_change"), Hint = _U('cloak_change'),
GPS = {x = 884.86, y = -2176.51, z = 29.51} GPS = {x = 884.86, y = -2176.51, z = 29.51}
}, },
@@ -36,22 +36,22 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_rock"), Name = _U('m_rock'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("m_rock"), name = _U('m_rock'),
db_name = "stone", db_name = 'stone',
time = 3000, time = 3000,
max = 7, max = 7,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
Hint = _U("m_pickrocks"), Hint = _U('m_pickrocks'),
GPS = {x = 289.24, y = 2862.90, z = 42.64} GPS = {x = 289.24, y = 2862.90, z = 42.64}
}, },
@@ -61,22 +61,22 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_washrock"), Name = _U('m_washrock'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("m_washrock"), name = _U('m_washrock'),
db_name = "washed_stone", db_name = 'washed_stone',
time = 5000, time = 5000,
max = 7, max = 7,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "stone", requires = 'stone',
requires_name = _U("m_rock"), requires_name = _U('m_rock'),
drop = 100 drop = 100
} }
}, },
Hint = _U("m_rock_button"), Hint = _U('m_rock_button'),
GPS = {x = 1109.14, y = -2007.87, z = 30.01} GPS = {x = 1109.14, y = -2007.87, z = 30.01}
}, },
@@ -86,43 +86,43 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_rock_smelting"), Name = _U('m_rock_smelting'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("m_copper"), name = _U('m_copper'),
db_name = "copper", db_name = 'copper',
time = 4000, time = 4000,
max = 56, max = 56,
add = 8, add = 8,
remove = 1, remove = 1,
requires = "washed_stone", requires = 'washed_stone',
requires_name = _U("m_washrock"), requires_name = _U('m_washrock'),
drop = 100 drop = 100
}, },
{ {
name = _U("m_iron"), name = _U('m_iron'),
db_name = "iron", db_name = 'iron',
max = 42, max = 42,
add = 6, add = 6,
drop = 100 drop = 100
}, },
{ {
name = _U("m_gold"), name = _U('m_gold'),
db_name = "gold", db_name = 'gold',
max = 21, max = 21,
add = 3, add = 3,
drop = 100 drop = 100
}, },
{ {
name = _U("m_diamond"), name = _U('m_diamond'),
db_name = "diamond", db_name = 'diamond',
max = 50, max = 50,
add = 1, add = 1,
drop = 5 drop = 5
} }
}, },
Hint = _U("m_melt_button"), Hint = _U('m_melt_button'),
GPS = {x = -169.48, y = -2659.16, z = 5.00} GPS = {x = -169.48, y = -2659.16, z = 5.00}
}, },
@@ -132,10 +132,10 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("spawn_veh"), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("spawn_veh_button"), Hint = _U('spawn_veh_button'),
Caution = 2000, Caution = 2000,
GPS = {x = 2962.40, y = 2746.20, z = 42.39} GPS = {x = 2962.40, y = 2746.20, z = 42.39}
}, },
@@ -145,8 +145,8 @@ Config.Jobs.miner = {
Size = {x = 5.0, y = 5.0, z = 1.0}, Size = {x = 5.0, y = 5.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
Heading = 90.1, Heading = 90.1,
GPS = 0 GPS = 0
@@ -158,9 +158,9 @@ Config.Jobs.miner = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
@@ -173,22 +173,22 @@ Config.Jobs.miner = {
Size = {x = 5.0, y = 5.0, z = 3.0}, Size = {x = 5.0, y = 5.0, z = 3.0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_sell_copper"), Name = _U('m_sell_copper'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 56, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 56, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 5, price = 5,
requires = "copper", requires = 'copper',
requires_name = _U("m_copper"), requires_name = _U('m_copper'),
drop = 100 drop = 100
} }
}, },
Hint = _U("m_deliver_copper"), Hint = _U('m_deliver_copper'),
GPS = {x = -148.78, y = -1040.38, z = 26.27} GPS = {x = -148.78, y = -1040.38, z = 26.27}
}, },
@@ -199,22 +199,22 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_sell_iron"), Name = _U('m_sell_iron'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 42, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 42, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 9, price = 9,
requires = "iron", requires = 'iron',
requires_name = _U("m_iron"), requires_name = _U('m_iron'),
drop = 100 drop = 100
} }
}, },
Hint = _U("m_deliver_iron"), Hint = _U('m_deliver_iron'),
GPS = {x = 261.48, y = 207.35, z = 109.28} GPS = {x = 261.48, y = 207.35, z = 109.28}
}, },
@@ -225,22 +225,22 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_sell_gold"), Name = _U('m_sell_gold'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 21, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 21, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 25, price = 25,
requires = "gold", requires = 'gold',
requires_name = _U("m_gold"), requires_name = _U('m_gold'),
drop = 100 drop = 100
} }
}, },
Hint = _U("m_deliver_gold"), Hint = _U('m_deliver_gold'),
GPS = {x = -621.04, y = -228.53, z = 37.05} GPS = {x = -621.04, y = -228.53, z = 37.05}
}, },
@@ -251,22 +251,22 @@ Config.Jobs.miner = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("m_sell_diamond"), Name = _U('m_sell_diamond'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 50, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 50, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 250, price = 250,
requires = "diamond", requires = 'diamond',
requires_name = _U("m_diamond"), requires_name = _U('m_diamond'),
drop = 100 drop = 100
} }
}, },
Hint = _U("m_deliver_diamond"), Hint = _U('m_deliver_diamond'),
GPS = {x = 2962.40, y = 2746.20, z = 42.39} GPS = {x = 2962.40, y = 2746.20, z = 42.39}
} }
+10 -10
View File
@@ -9,8 +9,8 @@ Config.Jobs.reporter = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "rumpo", Hash = 'rumpo',
Trailer = "none", Trailer = 'none',
HasCaution = true HasCaution = true
} }
@@ -24,10 +24,10 @@ Config.Jobs.reporter = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("reporter_name"), Name = _U('reporter_name'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("reporter_garage"), Hint = _U('reporter_garage'),
Caution = 2000 Caution = 2000
}, },
@@ -36,8 +36,8 @@ Config.Jobs.reporter = {
Size = {x = 3.0, y = 3.0, z = 1.0}, Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
Heading = 200.1 Heading = 200.1
}, },
@@ -48,9 +48,9 @@ Config.Jobs.reporter = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
+40 -40
View File
@@ -9,8 +9,8 @@ Config.Jobs.slaughterer = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "benson", Hash = 'benson',
Trailer = "none", Trailer = 'none',
HasCaution = true HasCaution = true
} }
}, },
@@ -23,9 +23,9 @@ Config.Jobs.slaughterer = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("s_slaughter_locker"), Name = _U('s_slaughter_locker'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U("cloak_change") Hint = _U('cloak_change')
}, },
AliveChicken = { AliveChicken = {
@@ -34,22 +34,22 @@ Config.Jobs.slaughterer = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("s_hen"), Name = _U('s_hen'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("s_alive_chicken"), name = _U('s_alive_chicken'),
db_name = "alive_chicken", db_name = 'alive_chicken',
time = 3000, time = 3000,
max = 20, max = 20,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
Hint = _U("s_catch_hen") Hint = _U('s_catch_hen')
}, },
SlaughterHouse = { SlaughterHouse = {
@@ -58,22 +58,22 @@ Config.Jobs.slaughterer = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("s_slaughtered"), Name = _U('s_slaughtered'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("s_slaughtered_chicken"), name = _U('s_slaughtered_chicken'),
db_name = "slaughtered_chicken", db_name = 'slaughtered_chicken',
time = 5000, time = 5000,
max = 20, max = 20,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "alive_chicken", requires = 'alive_chicken',
requires_name = _U("s_alive_chicken"), requires_name = _U('s_alive_chicken'),
drop = 100 drop = 100
} }
}, },
Hint = _U("s_chop_animal") Hint = _U('s_chop_animal')
}, },
Packaging = { Packaging = {
@@ -82,22 +82,22 @@ Config.Jobs.slaughterer = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("s_package"), Name = _U('s_package'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("s_packagechicken"), name = _U('s_packagechicken'),
db_name = "packaged_chicken", db_name = 'packaged_chicken',
time = 4000, time = 4000,
max = 100, max = 100,
add = 5, add = 5,
remove = 1, remove = 1,
requires = "slaughtered_chicken", requires = 'slaughtered_chicken',
requires_name = _U("s_unpackaged"), requires_name = _U('s_unpackaged'),
drop = 100 drop = 100
} }
}, },
Hint = _U("s_unpackaged_button") Hint = _U('s_unpackaged_button')
}, },
VehicleSpawner = { VehicleSpawner = {
@@ -106,10 +106,10 @@ Config.Jobs.slaughterer = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("spawn_veh"), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("spawn_veh_button"), Hint = _U('spawn_veh_button'),
Caution = 2000 Caution = 2000
}, },
@@ -118,8 +118,8 @@ Config.Jobs.slaughterer = {
Size = {x = 3.0, y = 3.0, z = 1.0}, Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
Heading = 130.1 Heading = 130.1
}, },
@@ -130,9 +130,9 @@ Config.Jobs.slaughterer = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
@@ -145,22 +145,22 @@ Config.Jobs.slaughterer = {
Size = {x = 5.0, y = 5.0, z = 1.0}, Size = {x = 5.0, y = 5.0, z = 1.0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("delivery_point"), Name = _U('delivery_point'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 23, price = 23,
requires = "packaged_chicken", requires = 'packaged_chicken',
requires_name = _U("s_packagechicken"), requires_name = _U('s_packagechicken'),
drop = 100 drop = 100
} }
}, },
Hint = _U("s_deliver") Hint = _U('s_deliver')
} }
} }
} }
+40 -40
View File
@@ -9,8 +9,8 @@ Config.Jobs.tailor = {
Truck = { Truck = {
Spawner = 1, Spawner = 1,
Hash = "youga2", Hash = 'youga2',
Trailer = "none", Trailer = 'none',
HasCaution = true HasCaution = true
} }
@@ -24,9 +24,9 @@ Config.Jobs.tailor = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("dd_dress_locker"), Name = _U('dd_dress_locker'),
Type = "cloakroom", Type = 'cloakroom',
Hint = _U("cloak_change"), Hint = _U('cloak_change'),
GPS = {x = 740.80, y = -970.06, z = 23.46} GPS = {x = 740.80, y = -970.06, z = 23.46}
}, },
@@ -36,22 +36,22 @@ Config.Jobs.tailor = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("dd_wool"), Name = _U('dd_wool'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("dd_wool"), name = _U('dd_wool'),
db_name = "wool", db_name = 'wool',
time = 3000, time = 3000,
max = 40, max = 40,
add = 1, add = 1,
remove = 1, remove = 1,
requires = "nothing", requires = 'nothing',
requires_name = "Nothing", requires_name = 'Nothing',
drop = 100 drop = 100
} }
}, },
Hint = _U("dd_pickup"), Hint = _U('dd_pickup'),
GPS = {x = 715.95, y = -959.63, z = 29.39} GPS = {x = 715.95, y = -959.63, z = 29.39}
}, },
@@ -61,22 +61,22 @@ Config.Jobs.tailor = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("dd_fabric"), Name = _U('dd_fabric'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("dd_fabric"), name = _U('dd_fabric'),
db_name = "fabric", db_name = 'fabric',
time = 5000, time = 5000,
max = 80, max = 80,
add = 2, add = 2,
remove = 1, remove = 1,
requires = "wool", requires = 'wool',
requires_name = _U("dd_wool"), requires_name = _U('dd_wool'),
drop = 100 drop = 100
} }
}, },
Hint = _U("dd_makefabric"), Hint = _U('dd_makefabric'),
GPS = {x = 712.92, y = -970.58, z = 29.39} GPS = {x = 712.92, y = -970.58, z = 29.39}
}, },
@@ -86,22 +86,22 @@ Config.Jobs.tailor = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("dd_clothing"), Name = _U('dd_clothing'),
Type = "work", Type = 'work',
Item = { Item = {
{ {
name = _U("dd_clothing"), name = _U('dd_clothing'),
db_name = "clothe", db_name = 'clothe',
time = 4000, time = 4000,
max = 40, max = 40,
add = 1, add = 1,
remove = 2, remove = 2,
requires = "fabric", requires = 'fabric',
requires_name = _U("dd_fabric"), requires_name = _U('dd_fabric'),
drop = 100 drop = 100
} }
}, },
Hint = _U("dd_makeclothing"), Hint = _U('dd_makeclothing'),
GPS = {x = 429.59, y = -807.34, z = 28.49} GPS = {x = 429.59, y = -807.34, z = 28.49}
}, },
@@ -111,10 +111,10 @@ Config.Jobs.tailor = {
Color = {r = 204, g = 204, b = 0}, Color = {r = 204, g = 204, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("spawn_veh"), Name = _U('spawn_veh'),
Type = "vehspawner", Type = 'vehspawner',
Spawner = 1, Spawner = 1,
Hint = _U("spawn_veh_button"), Hint = _U('spawn_veh_button'),
Caution = 2000, Caution = 2000,
GPS = {x = 1978.92, y = 5171.70, z = 46.63} GPS = {x = 1978.92, y = 5171.70, z = 46.63}
}, },
@@ -124,8 +124,8 @@ Config.Jobs.tailor = {
Size = {x = 3.0, y = 3.0, z = 1.0}, Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1, Marker = -1,
Blip = false, Blip = false,
Name = _U("service_vh"), Name = _U('service_vh'),
Type = "vehspawnpt", Type = 'vehspawnpt',
Spawner = 1, Spawner = 1,
Heading = 270.1, Heading = 270.1,
GPS = 0 GPS = 0
@@ -137,9 +137,9 @@ Config.Jobs.tailor = {
Color = {r = 255, g = 0, b = 0}, Color = {r = 255, g = 0, b = 0},
Marker = 1, Marker = 1,
Blip = false, Blip = false,
Name = _U("return_vh"), Name = _U('return_vh'),
Type = "vehdelete", Type = 'vehdelete',
Hint = _U("return_vh_button"), Hint = _U('return_vh_button'),
Spawner = 1, Spawner = 1,
Caution = 2000, Caution = 2000,
GPS = 0, GPS = 0,
@@ -152,22 +152,22 @@ Config.Jobs.tailor = {
Size = {x = 5.0, y = 5.0, z = 3.0}, Size = {x = 5.0, y = 5.0, z = 3.0},
Marker = 1, Marker = 1,
Blip = true, Blip = true,
Name = _U("delivery_point"), Name = _U('delivery_point'),
Type = "delivery", Type = 'delivery',
Spawner = 1, Spawner = 1,
Item = { Item = {
{ {
name = _U("delivery"), name = _U('delivery'),
time = 500, time = 500,
remove = 1, remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 40, price = 40,
requires = "clothe", requires = 'clothe',
requires_name = _U("dd_clothing"), requires_name = _U('dd_clothing'),
drop = 100 drop = 100
} }
}, },
Hint = _U("dd_deliver_clothes"), Hint = _U('dd_deliver_clothes'),
GPS = {x = 1978.92, y = 5171.70, z = 46.63} GPS = {x = 1978.92, y = 5171.70, z = 46.63}
} }
} }
+164 -279
View File
@@ -1,33 +1,5 @@
local Keys = { local menuIsShowed, hintIsShowed, hintToDisplay, hasAlreadyEnteredMarker, isInMarker, onDuty, vehicleObjInCaseofDrop, vehicleInCaseofDrop, vehicleMaxHealth
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, local PlayerData, Blips, JobBlips, myPlate, spawner = {}, {}, {}, {}, 0
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177,
["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18,
["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70,
["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178,
["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173,
["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118
}
local PlayerData = {}
local menuIsShowed = false
local hintIsShowed = false
local hasAlreadyEnteredMarker = false
local Blips = {}
local JobBlips = {}
local isInMarker = false
local isInPublicMarker = false
local hintToDisplay = "no hint to display"
local onDuty = false
local spawner = 0
local myPlate = {}
local vehicleObjInCaseofDrop = nil
local vehicleInCaseofDrop = nil
local vehicleMaxHealth = nil
ESX = nil ESX = nil
@@ -54,14 +26,13 @@ end)
function OpenMenu() function OpenMenu()
ESX.UI.Menu.CloseAll() ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'cloakroom', ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'cloakroom', {
{
title = _U('cloakroom'), title = _U('cloakroom'),
align = 'top-left',
elements = { elements = {
{label = _U('job_wear'), value = 'job_wear'}, {label = _U('job_wear'), value = 'job_wear'},
{label = _U('citizen_wear'), value = 'citizen_wear'} {label = _U('citizen_wear'), value = 'citizen_wear'}
} }}, function(data, menu)
}, function(data, menu)
if data.current.value == 'citizen_wear' then if data.current.value == 'citizen_wear' then
onDuty = false onDuty = false
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
@@ -86,136 +57,121 @@ end
AddEventHandler('esx_jobs:action', function(job, zone) AddEventHandler('esx_jobs:action', function(job, zone)
menuIsShowed = true menuIsShowed = true
if zone.Type == "cloakroom" then if zone.Type == 'cloakroom' then
OpenMenu() OpenMenu()
elseif zone.Type == "work" then elseif zone.Type == 'work' then
hintToDisplay = "no hint to display" hintToDisplay = nil
hintIsShowed = false hintIsShowed = false
local playerPed = PlayerPedId() local playerPed = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) then if IsPedOnFoot(playerPed) then
ESX.ShowNotification(_U('foot_work'))
else
TriggerServerEvent('esx_jobs:startWork', zone.Item) TriggerServerEvent('esx_jobs:startWork', zone.Item)
else
ESX.ShowNotification(_U('foot_work'))
end end
elseif zone.Type == "vehspawner" then elseif zone.Type == 'vehspawner' then
local spawnPoint = nil local jobObject, spawnPoint, vehicle = Config.Jobs[PlayerData.job.name]
local vehicle = nil
for k,v in pairs(Config.Jobs) do if jobObject then
if PlayerData.job.name == k then for k,v in pairs(jobObject.Zones) do
for l,w in pairs(v.Zones) do if v.Type == 'vehspawnpt' and v.Spawner == zone.Spawner then
if w.Type == "vehspawnpt" and w.Spawner == zone.Spawner then spawnPoint = v
spawnPoint = w spawner = v.Spawner
spawner = w.Spawner break
end
end end
end
for m,x in pairs(v.Vehicles) do for k,v in pairs(jobObject.Vehicles) do
if x.Spawner == zone.Spawner then if v.Spawner == zone.Spawner then
vehicle = x vehicle = v
end break
end end
end end
end end
if ESX.Game.IsSpawnPointClear(spawnPoint.Pos, 5.0) then if jobObject and spawnPoint and vehicle and ESX.Game.IsSpawnPointClear(spawnPoint.Pos, 5.0) then
spawnVehicle(spawnPoint, vehicle, zone.Caution) spawnVehicle(spawnPoint, vehicle, zone.Caution)
else else
ESX.ShowNotification(_U('spawn_blocked')) ESX.ShowNotification(_U('spawn_blocked'))
end end
elseif zone.Type == "vehdelete" then elseif zone.Type == 'vehdelete' then
local looping = true local jobObject = Config.Jobs[PlayerData.job.name]
for k,v in pairs(Config.Jobs) do if jobObject then
if PlayerData.job.name == k then for k,v in pairs(jobObject.Zones) do
for l,w in pairs(v.Zones) do if v.Type == 'vehdelete' and v.Spawner == zone.Spawner then
if w.Type == "vehdelete" and w.Spawner == zone.Spawner then local playerPed = PlayerPedId()
local playerPed = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) then if IsPedInAnyVehicle(playerPed, false) then
local vehicle = GetVehiclePedIsIn(playerPed, false)
local plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle))
local driverPed = GetPedInVehicleSeat(vehicle, -1)
local vehicle = GetVehiclePedIsIn(playerPed, false) if playerPed == driverPed then
local plate = GetVehicleNumberPlateText(vehicle) if myPlate[plate] then
plate = string.gsub(plate, " ", "") myPlate[plate] = nil
local driverPed = GetPedInVehicleSeat(vehicle, -1)
if playerPed == driverPed then local vehicleHealth = GetVehicleEngineHealth(vehicleInCaseofDrop)
for i=1, #myPlate, 1 do -- fix for people using cheat engine to modify engine health
if myPlate[i] == plate then if vehicleHealth > vehicleMaxHealth then
vehicleHealth = vehicleMaxHealth
local vehicleHealth = GetVehicleEngineHealth(vehicleInCaseofDrop)
local giveBack = ESX.Math.Round(vehicleHealth / vehicleMaxHealth, 2)
TriggerServerEvent('esx_jobs:caution', "give_back", giveBack, 0, 0)
DeleteVehicle(GetVehiclePedIsIn(playerPed, false))
if w.Teleport ~= 0 then
ESX.Game.Teleport(playerPed, w.Teleport)
end
table.remove(myPlate, i)
if vehicleObjInCaseofDrop.HasCaution then
vehicleInCaseofDrop = nil
vehicleObjInCaseofDrop = nil
vehicleMaxHealth = nil
end
break
end
end end
else local giveBack = ESX.Math.Round(vehicleHealth / vehicleMaxHealth, 2)
ESX.ShowNotification(_U('not_your_vehicle'))
end
TriggerServerEvent('esx_jobs:caution', 'give_back', giveBack, 0, 0)
DeleteVehicle(GetVehiclePedIsIn(playerPed, false))
if v.Teleport ~= 0 then
ESX.Game.Teleport(playerPed, v.Teleport)
end
if vehicleObjInCaseofDrop.HasCaution then
vehicleInCaseofDrop, vehicleObjInCaseofDrop, vehicleMaxHealth = nil, nil, nil
end
end
else
ESX.ShowNotification(_U('not_your_vehicle'))
end end
looping = false
break
end end
if looping == false then break
break
end
end end
end end
if looping == false then
break
end
end end
elseif zone.Type == "delivery" then elseif zone.Type == 'delivery' then
if Blips['delivery'] ~= nil then if Blips.delivery then
RemoveBlip(Blips['delivery']) RemoveBlip(Blips.delivery)
Blips['delivery'] = nil Blips.delivery = nil
end end
hintToDisplay = "no hint to display" hintToDisplay = nil
hintIsShowed = false hintIsShowed = false
TriggerServerEvent('esx_jobs:startWork', zone.Item) TriggerServerEvent('esx_jobs:startWork', zone.Item)
end end
--nextStep(zone.GPS) --nextStep(zone.GPS)
end) end)
function nextStep(gps) function nextStep(gps)
if gps ~= 0 then if gps ~= 0 then
if Blips['delivery'] ~= nil then if Blips.delivery then
RemoveBlip(Blips['delivery']) RemoveBlip(Blips.delivery)
Blips['delivery'] = nil Blips.delivery = nil
end end
Blips['delivery'] = AddBlipForCoord(gps.x, gps.y, gps.z) Blips.delivery = AddBlipForCoord(gps.x, gps.y, gps.z)
SetBlipRoute(Blips['delivery'], true) SetBlipRoute(Blips.delivery, true)
ESX.ShowNotification(_U('next_point')) ESX.ShowNotification(_U('next_point'))
end end
end end
AddEventHandler('esx_jobs:hasExitedMarker', function(zone) AddEventHandler('esx_jobs:hasExitedMarker', function(zone)
TriggerServerEvent('esx_jobs:stopWork') TriggerServerEvent('esx_jobs:stopWork')
hintToDisplay = "no hint to display" hintToDisplay = nil
menuIsShowed = false menuIsShowed = false
hintIsShowed = false hintIsShowed = false
isInMarker = false isInMarker = false
@@ -232,11 +188,9 @@ AddEventHandler('esx:setJob', function(job)
end) end)
function deleteBlips() function deleteBlips()
if JobBlips[1] ~= nil then for k,v in ipairs(JobBlips) do
for i=1, #JobBlips, 1 do RemoveBlip(v)
RemoveBlip(JobBlips[i]) JobBlips[k] = nil
JobBlips[i] = nil
end
end end
end end
@@ -244,7 +198,7 @@ function refreshBlips()
local zones = {} local zones = {}
local blipInfo = {} local blipInfo = {}
if PlayerData.job ~= nil then if PlayerData.job then
for jobKey,jobValues in pairs(Config.Jobs) do for jobKey,jobValues in pairs(Config.Jobs) do
if jobKey == PlayerData.job.name then if jobKey == PlayerData.job.name then
@@ -253,14 +207,13 @@ function refreshBlips()
if zoneValues.Blip then if zoneValues.Blip then
local blip = AddBlipForCoord(zoneValues.Pos.x, zoneValues.Pos.y, zoneValues.Pos.z) local blip = AddBlipForCoord(zoneValues.Pos.x, zoneValues.Pos.y, zoneValues.Pos.z)
SetBlipSprite (blip, jobValues.BlipInfos.Sprite) SetBlipSprite (blip, jobValues.BlipInfos.Sprite)
SetBlipDisplay (blip, 4)
SetBlipScale (blip, 1.2) SetBlipScale (blip, 1.2)
SetBlipCategory(blip, 3) SetBlipCategory(blip, 3)
SetBlipColour (blip, jobValues.BlipInfos.Color) SetBlipColour (blip, jobValues.BlipInfos.Color)
SetBlipAsShortRange(blip, true) SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING") BeginTextCommandSetBlipName('STRING')
AddTextComponentString(zoneValues.Name) AddTextComponentSubstringPlayerName(zoneValues.Name)
EndTextCommandSetBlipName(blip) EndTextCommandSetBlipName(blip)
table.insert(JobBlips, blip) table.insert(JobBlips, blip)
end end
@@ -271,7 +224,7 @@ function refreshBlips()
end end
function spawnVehicle(spawnPoint, vehicle, vehicleCaution) function spawnVehicle(spawnPoint, vehicle, vehicleCaution)
hintToDisplay = 'no hint to display' hintToDisplay = nil
hintIsShowed = false hintIsShowed = false
TriggerServerEvent('esx_jobs:caution', 'take', vehicleCaution, spawnPoint, vehicle) TriggerServerEvent('esx_jobs:caution', 'take', vehicleCaution, spawnPoint, vehicle)
end end
@@ -282,7 +235,7 @@ AddEventHandler('esx_jobs:spawnJobVehicle', function(spawnPoint, vehicle)
ESX.Game.SpawnVehicle(vehicle.Hash, spawnPoint.Pos, spawnPoint.Heading, function(spawnedVehicle) ESX.Game.SpawnVehicle(vehicle.Hash, spawnPoint.Pos, spawnPoint.Heading, function(spawnedVehicle)
if vehicle.Trailer ~= "none" then if vehicle.Trailer ~= 'none' then
ESX.Game.SpawnVehicle(vehicle.Trailer, spawnPoint.Pos, spawnPoint.Heading, function(trailer) ESX.Game.SpawnVehicle(vehicle.Trailer, spawnPoint.Pos, spawnPoint.Heading, function(trailer)
AttachVehicleToTrailer(spawnedVehicle, trailer, 1.1) AttachVehicleToTrailer(spawnedVehicle, trailer, 1.1)
end) end)
@@ -291,8 +244,7 @@ AddEventHandler('esx_jobs:spawnJobVehicle', function(spawnPoint, vehicle)
-- save & set plate -- save & set plate
local plate = 'WORK' .. math.random(100, 900) local plate = 'WORK' .. math.random(100, 900)
SetVehicleNumberPlateText(spawnedVehicle, plate) SetVehicleNumberPlateText(spawnedVehicle, plate)
table.insert(myPlate, plate) myPlate[plate] = true
plate = string.gsub(plate, " ", "")
TaskWarpPedIntoVehicle(playerPed, spawnedVehicle, -1) TaskWarpPedIntoVehicle(playerPed, spawnedVehicle, -1)
@@ -307,9 +259,9 @@ end)
-- Show top left hint -- Show top left hint
Citizen.CreateThread(function() Citizen.CreateThread(function()
while true do while true do
Citizen.Wait(10) Citizen.Wait(0)
if hintIsShowed then if hintIsShowed and hintToDisplay then
ESX.ShowHelpNotification(hintToDisplay) ESX.ShowHelpNotification(hintToDisplay)
else else
Citizen.Wait(500) Citizen.Wait(500)
@@ -317,185 +269,118 @@ Citizen.CreateThread(function()
end end
end) end)
-- Display markers (only if on duty and the player's job ones) -- Draw markers (only if on duty and the player's job ones)
Citizen.CreateThread(function() Citizen.CreateThread(function()
while true do while true do
Citizen.Wait(1) Citizen.Wait(0)
local zones = {} local zones, currentZone, isInMarker = {}
local letSleep, playerPed = true, PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
if PlayerData.job ~= nil then if PlayerData.job then
for k,v in pairs(Config.Jobs) do if Config.Jobs[PlayerData.job.name] then
if PlayerData.job.name == k then zones = Config.Jobs[PlayerData.job.name].Zones
zones = v.Zones
end
end end
local coords = GetEntityCoords(PlayerPedId())
for k,v in pairs(zones) do for k,v in pairs(zones) do
if onDuty or v.Type == "cloakroom" or PlayerData.job.name == "reporter" then local distance = GetDistanceBetweenCoords(playerCoords, v.Pos.x, v.Pos.y, v.Pos.z, true)
if(v.Marker ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then
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)
end
end
end
end
end
end)
-- Display public markers if onDuty or v.Type == 'cloakroom' or PlayerData.job.name == 'reporter' then
Citizen.CreateThread(function() if(v.Marker ~= -1 and distance < Config.DrawDistance) then
while true do letSleep = false
Citizen.Wait(0) DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.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, nil, nil, false)
local coords = GetEntityCoords(PlayerPedId())
for k,v in pairs(Config.PublicZones) do
if(v.Marker ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then
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)
end
end
end
end)
-- Activate public marker
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local coords = GetEntityCoords(PlayerPedId())
local position = nil
local zone = nil
for k,v in pairs(Config.PublicZones) do
if GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x/2 then
isInPublicMarker = true
position = v.Teleport
zone = v
break
else
isInPublicMarker = false
end
end
if IsControlJustReleased(0, Keys['E']) and isInPublicMarker then
ESX.Game.Teleport(PlayerPedId(), position)
isInPublicMarker = false
end
-- hide or show top left zone hints
if isInPublicMarker then
hintToDisplay = zone.Hint
hintIsShowed = true
else
if not isInMarker then
hintToDisplay = "no hint to display"
hintIsShowed = false
end
end
end
end)
-- Activate menu when player is inside marker
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' then
local zones = nil
local job = nil
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
job = v
zones = v.Zones
end
end
if zones ~= nil then
local coords = GetEntityCoords(PlayerPedId())
local currentZone = nil
local zone = nil
local lastZone = nil
for k,v in pairs(zones) do
if GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x then
isInMarker = true
currentZone = k
zone = v
break
else
isInMarker = false
end end
end end
if IsControlJustReleased(0, Keys['E']) and not menuIsShowed and isInMarker then if distance < v.Size.x then
if onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter" then letSleep, isInMarker, currentZone = false, true, v
TriggerEvent('esx_jobs:action', job, zone) break
end
end end
end
-- hide or show top left zone hints if IsControlJustReleased(0, 38) and not menuIsShowed and isInMarker then
if isInMarker and not menuIsShowed then if onDuty or currentZone.Type == 'cloakroom' or PlayerData.job.name == 'reporter' then
TriggerEvent('esx_jobs:action', PlayerData.job.name, currentZone)
end
end
-- hide or show top left zone hints
if isInMarker and not menuIsShowed then
hintIsShowed = true
if (onDuty or currentZone.Type == 'cloakroom' or PlayerData.job.name == 'reporter') and currentZone.Type ~= 'vehdelete' then
hintToDisplay = currentZone.Hint
hintIsShowed = true hintIsShowed = true
if (onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter") and zone.Type ~= "vehdelete" then elseif currentZone.Type == 'vehdelete' and (onDuty or PlayerData.job.name == 'reporter') then
hintToDisplay = zone.Hint local playerPed = PlayerPedId()
hintIsShowed = true
elseif zone.Type == "vehdelete" and (onDuty or PlayerData.job.name == "reporter") then
local playerPed = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) then if IsPedInAnyVehicle(playerPed, false) then
local vehicle = GetVehiclePedIsIn(playerPed, false) local vehicle = GetVehiclePedIsIn(playerPed, false)
local driverPed = GetPedInVehicleSeat(vehicle, -1) local driverPed = GetPedInVehicleSeat(vehicle, -1)
local plate = GetVehicleNumberPlateText(vehicle) local plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle))
plate = string.gsub(plate, " ", "")
if playerPed == driverPed then if playerPed == driverPed then
if myPlate[plate] then
for i=1, #myPlate, 1 do hintToDisplay = currentZone.Hint
if myPlate[i] == plate then
hintToDisplay = zone.Hint
break
end
end
else
hintToDisplay = _U('not_your_vehicle')
end end
else else
hintToDisplay = _U('in_vehicle') hintToDisplay = _U('not_your_vehicle')
end end
hintIsShowed = true
elseif onDuty and zone.Spawner ~= spawner then
hintToDisplay = _U('wrong_point')
hintIsShowed = true
else else
if not isInPublicMarker then hintToDisplay = _U('in_vehicle')
hintToDisplay = "no hint to display"
hintIsShowed = false
end
end end
end hintIsShowed = true
elseif onDuty and currentZone.Spawner ~= spawner then
if isInMarker and not hasAlreadyEnteredMarker then hintToDisplay = _U('wrong_point')
hasAlreadyEnteredMarker = true hintIsShowed = true
end else
hintToDisplay = nil
if not isInMarker and hasAlreadyEnteredMarker then hintIsShowed = false
hasAlreadyEnteredMarker = false
TriggerEvent('esx_jobs:hasExitedMarker', zone)
end end
end end
if isInMarker and not hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = true
end
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_jobs:hasExitedMarker', currentZone)
end
end
for k,v in pairs(Config.PublicZones) do
local distance = GetDistanceBetweenCoords(playerCoords, v.Pos.x, v.Pos.y, v.Pos.z, true)
if v.Marker ~= -1 and distance < Config.DrawDistance then
DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.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, nil, nil, false)
letSleep = false
end
if distance < v.Size.x / 2 then
letSleep, isInPublicMarker = false, true
ESX.ShowHelpNotification(v.Hint)
if IsControlJustReleased(0, 38) then
ESX.Game.Teleport(playerPed, v.Teleport)
end
end
end
if letSleep then
Citizen.Wait(500)
end end
end end
end) end)
Citizen.CreateThread(function() Citizen.CreateThread(function()
-- Slaughterer -- Slaughterer
RemoveIpl("CS1_02_cf_offmission") RemoveIpl('CS1_02_cf_offmission')
RequestIpl("CS1_02_cf_onmission1") RequestIpl('CS1_02_cf_onmission1')
RequestIpl("CS1_02_cf_onmission2") RequestIpl('CS1_02_cf_onmission2')
RequestIpl("CS1_02_cf_onmission3") RequestIpl('CS1_02_cf_onmission3')
RequestIpl("CS1_02_cf_onmission4") RequestIpl('CS1_02_cf_onmission4')
-- Tailor -- Tailor
RequestIpl("id2_14_during_door") RequestIpl('id2_14_during_door')
RequestIpl("id2_14_during1") RequestIpl('id2_14_during1')
end) end)
+1 -1
View File
@@ -8,7 +8,7 @@ Locales['en'] = {
['bank_deposit_taken'] = 'a security deposit of ~r~$%s~s~ was taken from you.', ['bank_deposit_taken'] = 'a security deposit of ~r~$%s~s~ was taken from you.',
['foot_work'] = 'you have to be on foot to be able to work.', ['foot_work'] = 'you have to be on foot to be able to work.',
['next_point'] = 'go to the next step after completing this one.', ['next_point'] = 'go to the next step after completing this one.',
['not_your_vehicle'] = 'this is not your vehicle or you must be a driver.', ['not_your_vehicle'] = 'you are not the driver of this vehicle.',
['in_vehicle'] = 'you must sit in a vehicle.', ['in_vehicle'] = 'you must sit in a vehicle.',
['wrong_point'] = 'you are not at the right point of delivery.', ['wrong_point'] = 'you are not at the right point of delivery.',
['max_limit'] = 'you cannot carry more ~y~%s~s~', ['max_limit'] = 'you cannot carry more ~y~%s~s~',
+5 -5
View File
@@ -21,13 +21,13 @@ local function Work(source, item)
end end
local requiredItemQtty = 0 local requiredItemQtty = 0
if item[1].requires ~= "nothing" then if item[1].requires ~= 'nothing' then
requiredItemQtty = xPlayer.getInventoryItem(item[1].requires).count requiredItemQtty = xPlayer.getInventoryItem(item[1].requires).count
end end
if item[i].name ~= _U('delivery') and itemQtty >= item[i].max then if item[i].name ~= _U('delivery') and itemQtty >= item[i].max then
xPlayer.showNotification(_U('max_limit', item[i].name)) xPlayer.showNotification(_U('max_limit', item[i].name))
elseif item[i].requires ~= "nothing" and requiredItemQtty <= 0 then elseif item[i].requires ~= 'nothing' and requiredItemQtty <= 0 then
xPlayer.showNotification(_U('not_enough', item[1].requires_name)) xPlayer.showNotification(_U('not_enough', item[1].requires_name))
else else
if item[i].name ~= _U('delivery') then if item[i].name ~= _U('delivery') then
@@ -46,7 +46,7 @@ local function Work(source, item)
end end
end end
if item[1].requires ~= "nothing" then if item[1].requires ~= 'nothing' then
local itemToRemoveQtty = xPlayer.getInventoryItem(item[1].requires).count local itemToRemoveQtty = xPlayer.getInventoryItem(item[1].requires).count
if itemToRemoveQtty > 0 then if itemToRemoveQtty > 0 then
xPlayer.removeInventoryItem(item[1].requires, item[1].remove) xPlayer.removeInventoryItem(item[1].requires, item[1].remove)
@@ -78,7 +78,7 @@ RegisterServerEvent('esx_jobs:caution')
AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPoint, vehicle) AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPoint, vehicle)
local xPlayer = ESX.GetPlayerFromId(source) local xPlayer = ESX.GetPlayerFromId(source)
if cautionType == "take" then if cautionType == 'take' then
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account) TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
xPlayer.removeAccountMoney('bank', cautionAmount) xPlayer.removeAccountMoney('bank', cautionAmount)
account.addMoney(cautionAmount) account.addMoney(cautionAmount)
@@ -86,7 +86,7 @@ AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPo
xPlayer.showNotification(_U('bank_deposit_taken', ESX.Math.GroupDigits(cautionAmount))) xPlayer.showNotification(_U('bank_deposit_taken', ESX.Math.GroupDigits(cautionAmount)))
TriggerClientEvent('esx_jobs:spawnJobVehicle', source, spawnPoint, vehicle) TriggerClientEvent('esx_jobs:spawnJobVehicle', source, spawnPoint, vehicle)
elseif cautionType == "give_back" then elseif cautionType == 'give_back' then
if cautionAmount > 1 then if cautionAmount > 1 then
print(('esx_jobs: %s is using cheat engine!'):format(xPlayer.identifier)) print(('esx_jobs: %s is using cheat engine!'):format(xPlayer.identifier))