Tab indent, code improvements

This commit is contained in:
ElPumpo
2018-08-25 00:43:20 +02:00
parent 3edf02d047
commit ab491550be
15 changed files with 1250 additions and 1269 deletions
-2
View File
@@ -8,7 +8,6 @@ server_scripts {
'@mysql-async/lib/MySQL.lua',
'@es_extended/locale.lua',
'locales/br.lua',
'locales/de.lua',
'locales/en.lua',
'locales/fi.lua',
'locales/fr.lua',
@@ -20,7 +19,6 @@ server_scripts {
client_scripts {
'@es_extended/locale.lua',
'locales/br.lua',
'locales/de.lua',
'locales/fi.lua',
'locales/en.lua',
'locales/fr.lua',
+161 -156
View File
@@ -1,167 +1,172 @@
Config.Jobs.fisherman = {
BlipInfos = {
Sprite = 68,
Color = 38
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "benson",
Trailer = "none",
HasCaution = true
},
Boat = {
Spawner = 2,
Hash = "tug",
Trailer = "none",
HasCaution = false
}
},
Zones = {
CloakRoom = {
Pos = {x = 868.39929199219, y = -1639.7556152344, z = 29.339252471924},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('fm_fish_locker'),
Type = "cloakroom",
Hint = _U('cloak_change'),
GPS = {x = 880.74462890625, y = -1663.9635009766, z = 29.370491027832}
},
FishingSpot = {
Pos = {x = 4435.21, y = 4829.6, z = 0.3439},
Color = {r = 204, g = 204, b = 0},
Size = {x = 110.0, y = 110.0, z = 10.0},
Marker= 1,
Blip = true,
Name = _U('fm_fish_area'),
Type = "work",
Item = {
{
name = _U('fm_fish'),
db_name= "fish",
time = 2000,
max = 100,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U('fm_fish_button'),
GPS = {x = 3859.43, y = 4448.83, z = 0.39994}
},
BlipInfos = {
Sprite = 68,
Color = 38
},
BoatSpawner = {
Pos = {x = 3867.44, y = 4463.62, z = 1.72386},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('fm_spawnboat_title'),
Type = "vehspawner",
Spawner = 2,
Hint = _U('fm_spawnboat'),
Caution = 0,
GPS = {x = 4435.21, y = 4829.6, z = 0.3439}
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "benson",
Trailer = "none",
HasCaution = true
},
BoatSpawnPoint = {
Pos = {x = 3888.3, y = 4468.09, z = 0.0},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('fm_boat_title'),
Type = "vehspawnpt",
Spawner = 2,
GPS = 0,
Heading = 270.1
},
Boat = {
Spawner = 2,
Hash = "tug",
Trailer = "none",
HasCaution = false
}
},
BoatDeletePoint = {
Pos = {x = 3859.43, y = 4448.83, z = 0.39994},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('fm_boat_return_title'),
Type = "vehdelete",
Hint = _U('fm_boat_return_button'),
Spawner = 2,
Caution = 0,
GPS = {x = -1012.64758300781, y = -1354.62634277344, z = 5.54292726516724},
Teleport = {x = 3867.44, y = 4463.62, z = 1.72386}
},
Zones = {
CloakRoom = {
Pos = {x = 868.39, y = -1639.75, z = 29.33},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('fm_fish_locker'),
Type = "cloakroom",
Hint = _U('cloak_change'),
GPS = {x = 880.74, y = -1663.96, z = 29.37}
},
VehicleSpawner = {
Pos = {x = 880.74462890625, y = -1663.9635009766, z = 29.370491027832},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_veh_button'),
Caution = 2000,
GPS = {x = 3867.44, y = 4463.62, z = 1.72386}
},
FishingSpot = {
Pos = {x = 4435.21, y = 4829.6, z = 0.34},
Color = {r = 204, g = 204, b = 0},
Size = {x = 110.0, y = 110.0, z = 10.0},
Marker= 1,
Blip = true,
Name = _U('fm_fish_area'),
Type = "work",
Hint = _U('fm_fish_button'),
GPS = {x = 3859.43, y = 4448.83, z = 0.39},
Item = {
{
name = _U('fm_fish'),
db_name= "fish",
time = 2000,
max = 100,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
VehicleSpawnPoint = {
Pos = {x = 859.354, y = -1656.21, z = 29.5697},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
GPS = 0,
Heading = 70.1
},
},
VehicleDeletePoint = {
Pos = {x = 863.23254394531, y = -1718.2849121094, z = 28.631998062134},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
BoatSpawner = {
Pos = {x = 3867.44, y = 4463.62, z = 1.72},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('fm_spawnboat_title'),
Type = "vehspawner",
Spawner = 2,
Hint = _U('fm_spawnboat'),
Caution = 0,
GPS = {x = 4435.21, y = 4829.6, z = 0.34}
},
Delivery = {
Pos = {x = -1012.64758300781, y = -1354.62634277344, z = 5.54292726516724},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('delivery_point'),
Type = "delivery",
Spawner = 2,
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 11,
requires = "fish",
requires_name = _U('fm_fish'),
drop = 100
}
},
Hint = _U('fm_deliver_fish'),
GPS = {x = 3867.44, y = 4463.62, z = 1.72386}
}
}
BoatSpawnPoint = {
Pos = {x = 3888.3, y = 4468.09, z = 0.0},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('fm_boat_title'),
Type = "vehspawnpt",
Spawner = 2,
GPS = 0,
Heading = 270.1
},
BoatDeletePoint = {
Pos = {x = 3859.43, y = 4448.83, z = 0.39},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('fm_boat_return_title'),
Type = "vehdelete",
Hint = _U('fm_boat_return_button'),
Spawner = 2,
Caution = 0,
GPS = {x = -1012.64, y = -1354.62, z = 5.54},
Teleport = {x = 3867.44, y = 4463.62, z = 1.72}
},
VehicleSpawner = {
Pos = {x = 880.74, y = -1663.96, z = 29.37},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_veh_button'),
Caution = 2000,
GPS = {x = 3867.44, y = 4463.62, z = 1.72}
},
VehicleSpawnPoint = {
Pos = {x = 859.35, y = -1656.21, z = 29.56},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
GPS = 0,
Heading = 70.1
},
VehicleDeletePoint = {
Pos = {x = 863.23, y = -1718.28, z = 28.63},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
Delivery = {
Pos = {x = -1012.64, y = -1354.62, z = 5.54},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('delivery_point'),
Type = "delivery",
Spawner = 2,
Hint = _U('fm_deliver_fish'),
GPS = {x = 3867.44, y = 4463.62, z = 1.72},
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 11,
requires = "fish",
requires_name = _U('fm_fish'),
drop = 100
}
},
}
}
}
+170 -159
View File
@@ -1,168 +1,179 @@
Config.Jobs.fueler = {
BlipInfos = {
Sprite = 436,
Color = 5
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "phantom",
Trailer = "tanker",
HasCaution = true
}
},
Zones = {
CloakRoom = { -- 1
Pos = {x = 557.933, y = -2327.9, z = 4.82896},
Size = {x = 3.0, y = 3.0, z = 2.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('f_oil_refiner'),
Type = "cloakroom",
Hint = _U('cloak_change'),
GPS = {x = 554.597, y = -2314.43, z = 4.86293}
},
ChampPetrol = { -- 4 -- 8
Pos = {x = 609.589, y = 2856.74, z = 39.4958},
Size = {x = 20.0, y = 20.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('f_drill_oil'),
Type = "work",
Item = {
{
name = _U('f_fuel'),
db_name= "petrol",
time = 5000,
max = 24,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U('f_drillbutton'),
GPS = {x = 2736.94, y = 1417.99, z = 23.4888}
},
BlipInfos = {
Sprite = 436,
Color = 5
},
Raffinerie = { -- 5
Pos = {x = 2736.94, y = 1417.99, z = 23.4888},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('f_fuel_refine'),
Type = "work",
Item = {
{
name = _U('f_fuel_refine'),
db_name= "petrol_raffin",
time = 5000,
max = 24,
add = 1,
remove = 2,
requires = "petrol",
requires_name = _U('f_fuel'),
drop = 100
}
},
Hint = _U('f_refine_fuel_button'),
GPS = {x = 265.752, y = -3013.39, z = 4.73275}
},
Vehicles = {
Melange = { -- 6
Pos = {x = 265.752, y = -3013.39, z = 4.73275},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('f_fuel_mixture'),
Type = "work",
Item = {
{
name = _U('f_gas'),
db_name= "essence",
time = 5000,
max = 24,
add = 2,
remove = 1,
requires = "petrol_raffin",
requires_name = _U('f_fuel_refine'),
drop = 100
}
},
Hint = _U('f_fuel_mixture_button'),
GPS = {x = 491.406, y = -2163.37, z = 4.91827}
},
Truck = {
Spawner = 1,
Hash = "phantom",
Trailer = "tanker",
HasCaution = true
}
VehicleSpawner = { -- 2
Pos = {x = 554.597, y = -2314.43, z = 4.86293},
Size = {x = 3.0, y = 3.0, z = 2.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_truck_button'),
Caution = 2000,
GPS = {x = 602.254, y = 2926.62, z = 39.6898}
},
},
VehicleSpawnPoint = {
Pos = {x = 580.541, y = -2309.7, z = 4.90915},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
GPS = 0,
Heading = 0
},
Zones = {
VehicleDeletePoint = {
Pos = {x = 520.684, y = -2124.21, z = 4.98635},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
CloakRoom = {
-- 1
Pos = {x = 557.933, y = -2327.9, z = 4.82896},
Size = {x = 3.0, y = 3.0, z = 2.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("f_oil_refiner"),
Type = "cloakroom",
Hint = _U("cloak_change"),
GPS = {x = 554.597, y = -2314.43, z = 4.86293}
},
Delivery = { -- 7
Pos = {x = 491.406, y = -2163.37, z = 4.91827},
Color = {r = 204, g = 204, b = 0},
Size = {x = 10.0, y = 10.0, z = 1.0},
Marker= 1,
Blip = true,
Name = _U('f_deliver_gas'),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 61,
requires = "essence",
requires_name = _U('f_gas'),
drop = 100
}
},
Hint = _U('f_deliver_gas'),
GPS = {x = 609.589, y = 2856.74, z = 39.4958}
}
}
ChampPetrol = {
Pos = {x = 609.589, y = 2856.74, z = 39.4958},
Size = {x = 20.0, y = 20.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("f_drill_oil"),
Type = "work",
Item = {
{
name = _U("f_fuel"),
db_name = "petrol",
time = 5000,
max = 24,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U("f_drillbutton"),
GPS = {x = 2736.94, y = 1417.99, z = 23.4888}
},
Raffinerie = {
Pos = {x = 2736.94, y = 1417.99, z = 23.4888},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("f_fuel_refine"),
Type = "work",
Item = {
{
name = _U("f_fuel_refine"),
db_name = "petrol_raffin",
time = 5000,
max = 24,
add = 1,
remove = 2,
requires = "petrol",
requires_name = _U("f_fuel"),
drop = 100
}
},
Hint = _U("f_refine_fuel_button"),
GPS = {x = 265.752, y = -3013.39, z = 4.73275}
},
Melange = {
-- 6
Pos = {x = 265.752, y = -3013.39, z = 4.73275},
Size = {x = 10.0, y = 10.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("f_fuel_mixture"),
Type = "work",
Item = {
{
name = _U("f_gas"),
db_name = "essence",
time = 5000,
max = 24,
add = 2,
remove = 1,
requires = "petrol_raffin",
requires_name = _U("f_fuel_refine"),
drop = 100
}
},
Hint = _U("f_fuel_mixture_button"),
GPS = {x = 491.406, y = -2163.37, z = 4.91827}
},
VehicleSpawner = {
-- 2
Pos = {x = 554.597, y = -2314.43, z = 4.86293},
Size = {x = 3.0, y = 3.0, z = 2.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("spawn_veh"),
Type = "vehspawner",
Spawner = 1,
Hint = _U("spawn_truck_button"),
Caution = 2000,
GPS = {x = 602.254, y = 2926.62, z = 39.6898}
},
VehicleSpawnPoint = {
Pos = {x = 580.541, y = -2309.7, z = 4.90915},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1,
Blip = false,
Name = _U("service_vh"),
Type = "vehspawnpt",
Spawner = 1,
GPS = 0,
Heading = 0
},
VehicleDeletePoint = {
Pos = {x = 520.684, y = -2124.21, z = 4.98635},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker = 1,
Blip = false,
Name = _U("return_vh"),
Type = "vehdelete",
Hint = _U("return_vh_button"),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
Delivery = {
-- 7
Pos = {x = 491.406, y = -2163.37, z = 4.91827},
Color = {r = 204, g = 204, b = 0},
Size = {x = 10.0, y = 10.0, z = 1.0},
Marker = 1,
Blip = true,
Name = _U("f_deliver_gas"),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U("delivery"),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 61,
requires = "essence",
requires_name = _U("f_gas"),
drop = 100
}
},
Hint = _U("f_deliver_gas"),
GPS = {x = 609.589, y = 2856.74, z = 39.4958}
}
}
}
+158 -152
View File
@@ -1,161 +1,167 @@
Config.Jobs.lumberjack = {
BlipInfos = {
Sprite = 237,
Color = 4
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "phantom",
Trailer = "trailers",
HasCaution = true
}
},
Zones = {
CloakRoom = {
Pos = {x = 1200.63, y = -1276.875, z = 34.38},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('lj_locker_room'),
Type = "cloakroom",
Hint = _U('cloak_change'),
},
Wood = {
Pos = {x = -534.323669433594, y = 5373.794921875, z = 69.503059387207},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('lj_mapblip'),
Type = "work",
Item = {
{
name = _U('lj_wood'),
db_name= "wood",
time = 3000,
max = 20,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U('lj_pickup')
},
BlipInfos = {
Sprite = 237,
Color = 4
},
CuttedWood = {
Pos = {x = -552.214660644531, y = 5326.90966796875, z = 72.5996017456055},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('lj_cutwood'),
Type = "work",
Item = {
{
name = _U('lj_cutwood'),
db_name= "cutted_wood",
time = 5000,
max = 20,
add = 1,
remove = 1,
requires = "wood",
requires_name = _U('lj_wood'),
drop = 100
}
},
Hint = _U('lj_cutwood_button')
},
Vehicles = {
Planks = {
Pos = {x = -501.386596679688, y = 5280.53076171875, z = 79.6187744140625},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('lj_board'),
Type = "work",
Item = {
{
name = _U('lj_planks'),
db_name= "packaged_plank",
time = 4000,
max = 100,
add = 5,
remove = 1,
requires = "cutted_wood",
requires_name = _U('lj_cutwood'),
drop = 100
}
},
Hint = _U('lj_pick_boards')
},
Truck = {
Spawner = 1,
Hash = "phantom",
Trailer = "trailers",
HasCaution = true
}
VehicleSpawner = {
Pos = {x = 1191.9681396484, y = -1261.7775878906, z = 34.170627593994},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_veh_button'),
Caution = 2000
},
},
VehicleSpawnPoint = {
Pos = {x = 1194.6257324219, y = -1286.955078125, z = 34.121524810791},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
Heading = 285.1
},
Zones = {
VehicleDeletePoint = {
Pos = {x = 1216.8983154297, y = -1229.2396240234, z = 34.403507232666},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
CloakRoom = {
Pos = {x = 1200.63, y = -1276.875, z = 34.38},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("lj_locker_room"),
Type = "cloakroom",
Hint = _U("cloak_change")
},
Delivery = {
Pos = {x = 1201.3558349609, y = -1327.5159912109, z = 34.226093292236},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Marker= 1,
Blip = true,
Name = _U('delivery_point'),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 13,
requires = "packaged_plank",
requires_name = _U('lj_planks'),
drop = 100
}
},
Hint = _U('lj_deliver_button')
}
}
Wood = {
Pos = {x = -534.32, y = 5373.79, z = 69.50},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("lj_mapblip"),
Type = "work",
Item = {
{
name = _U("lj_wood"),
db_name = "wood",
time = 3000,
max = 20,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U("lj_pickup")
},
CuttedWood = {
Pos = {x = -552.21, y = 5326.90, z = 72.59},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("lj_cutwood"),
Type = "work",
Item = {
{
name = _U("lj_cutwood"),
db_name = "cutted_wood",
time = 5000,
max = 20,
add = 1,
remove = 1,
requires = "wood",
requires_name = _U("lj_wood"),
drop = 100
}
},
Hint = _U("lj_cutwood_button")
},
Planks = {
Pos = {x = -501.38, y = 5280.53, z = 79.61},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("lj_board"),
Type = "work",
Item = {
{
name = _U("lj_planks"),
db_name = "packaged_plank",
time = 4000,
max = 100,
add = 5,
remove = 1,
requires = "cutted_wood",
requires_name = _U("lj_cutwood"),
drop = 100
}
},
Hint = _U("lj_pick_boards")
},
VehicleSpawner = {
Pos = {x = 1191.9681396484, y = -1261.7775878906, z = 34.170627593994},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("spawn_veh"),
Type = "vehspawner",
Spawner = 1,
Hint = _U("spawn_veh_button"),
Caution = 2000
},
VehicleSpawnPoint = {
Pos = {x = 1194.6257324219, y = -1286.955078125, z = 34.121524810791},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1,
Blip = false,
Name = _U("service_vh"),
Type = "vehspawnpt",
Spawner = 1,
Heading = 285.1
},
VehicleDeletePoint = {
Pos = {x = 1216.8983154297, y = -1229.2396240234, z = 34.403507232666},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker = 1,
Blip = false,
Name = _U("return_vh"),
Type = "vehdelete",
Hint = _U("return_vh_button"),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
Delivery = {
Pos = {x = 1201.3558349609, y = -1327.5159912109, z = 34.226093292236},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Marker = 1,
Blip = true,
Name = _U("delivery_point"),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U("delivery"),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 13,
requires = "packaged_plank",
requires_name = _U("lj_planks"),
drop = 100
}
},
Hint = _U("lj_deliver_button")
}
}
}
+157 -152
View File
@@ -1,161 +1,166 @@
Config.Jobs.slaughterer = {
BlipInfos = {
Sprite = 256,
Color = 5
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "benson",
Trailer = "none",
HasCaution = true
}
},
Zones = {
CloakRoom = {
Pos = {x = -1071.1319580078, y = -2003.7891845703, z = 14.78551197052},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('s_slaughter_locker'),
Type = "cloakroom",
Hint = _U('cloak_change'),
},
AliveChicken = {
Pos = {x = -62.9018, y = 6241.46, z = 30.0901},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('s_hen'),
Type = "work",
Item = {
{
name = _U('s_alive_chicken'),
db_name= "alive_chicken",
time = 3000,
max = 20,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U('s_catch_hen')
},
BlipInfos = {
Sprite = 256,
Color = 5
},
SlaughterHouse = {
Pos = {x = -77.991, y = 6229.063, z = 30.091},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('s_slaughtered'),
Type = "work",
Item = {
{
name = _U('s_slaughtered_chicken'),
db_name= "slaughtered_chicken",
time = 5000,
max = 20,
add = 1,
remove = 1,
requires = "alive_chicken",
requires_name = _U('s_alive_chicken'),
drop = 100
}
},
Hint = _U('s_chop_animal')
},
Vehicles = {
Packaging = {
Pos = {x = -101.978, y = 6208.799, z = 30.025},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('s_package'),
Type = "work",
Item = {
{
name = _U('s_packagechicken'),
db_name= "packaged_chicken",
time = 4000,
max = 100,
add = 5,
remove = 1,
requires = "slaughtered_chicken",
requires_name = _U('s_unpackaged'),
drop = 100
}
},
Hint = _U('s_unpackaged_button')
},
Truck = {
Spawner = 1,
Hash = "benson",
Trailer = "none",
HasCaution = true
}
},
VehicleSpawner = {
Pos = {x = -1042.9444580078, y = -2023.2551269531, z = 12.161581993103},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_veh_button'),
Caution = 2000
},
Zones = {
VehicleSpawnPoint = {
Pos = {x = -1048.8568115234, y = -2025.322265625, z = 12.161581993103},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
Heading = 130.1
},
CloakRoom = {
Pos = {x = -1071.1319580078, y = -2003.7891845703, z = 14.78551197052},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("s_slaughter_locker"),
Type = "cloakroom",
Hint = _U("cloak_change")
},
VehicleDeletePoint = {
Pos = {x = -1061.5164794922, y = -2008.3552246094, z = 12.161584854126},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
AliveChicken = {
Pos = {x = -62.9018, y = 6241.46, z = 30.0901},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("s_hen"),
Type = "work",
Item = {
{
name = _U("s_alive_chicken"),
db_name = "alive_chicken",
time = 3000,
max = 20,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U("s_catch_hen")
},
Delivery = {
Pos = {x = -596.158, y = -889.324, z = 24.5073},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 1.0},
Marker= 1,
Blip = true,
Name = _U('delivery_point'),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 11,
requires = "packaged_chicken",
requires_name = _U('s_packagechicken'),
drop = 100
}
},
Hint = _U('s_deliver')
}
}
SlaughterHouse = {
Pos = {x = -77.991, y = 6229.063, z = 30.091},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("s_slaughtered"),
Type = "work",
Item = {
{
name = _U("s_slaughtered_chicken"),
db_name = "slaughtered_chicken",
time = 5000,
max = 20,
add = 1,
remove = 1,
requires = "alive_chicken",
requires_name = _U("s_alive_chicken"),
drop = 100
}
},
Hint = _U("s_chop_animal")
},
Packaging = {
Pos = {x = -101.978, y = 6208.799, z = 30.025},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("s_package"),
Type = "work",
Item = {
{
name = _U("s_packagechicken"),
db_name = "packaged_chicken",
time = 4000,
max = 100,
add = 5,
remove = 1,
requires = "slaughtered_chicken",
requires_name = _U("s_unpackaged"),
drop = 100
}
},
Hint = _U("s_unpackaged_button")
},
VehicleSpawner = {
Pos = {x = -1042.9444580078, y = -2023.2551269531, z = 12.161581993103},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("spawn_veh"),
Type = "vehspawner",
Spawner = 1,
Hint = _U("spawn_veh_button"),
Caution = 2000
},
VehicleSpawnPoint = {
Pos = {x = -1048.8568115234, y = -2025.322265625, z = 12.161581993103},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1,
Blip = false,
Name = _U("service_vh"),
Type = "vehspawnpt",
Spawner = 1,
Heading = 130.1
},
VehicleDeletePoint = {
Pos = {x = -1061.5164794922, y = -2008.3552246094, z = 12.161584854126},
Size = {x = 5.0, y = 5.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker = 1,
Blip = false,
Name = _U("return_vh"),
Type = "vehdelete",
Hint = _U("return_vh_button"),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
Delivery = {
Pos = {x = -596.158, y = -889.324, z = 24.5073},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 1.0},
Marker = 1,
Blip = true,
Name = _U("delivery_point"),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U("delivery"),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 11,
requires = "packaged_chicken",
requires_name = _U("s_packagechicken"),
drop = 100
}
},
Hint = _U("s_deliver")
}
}
}
+165 -159
View File
@@ -1,168 +1,174 @@
Config.Jobs.tailor = {
BlipInfos = {
Sprite = 366,
Color = 4
},
Vehicles = {
Truck = {
Spawner = 1,
Hash = "youga2",
Trailer = "none",
HasCaution = true
}
},
Zones = {
CloakRoom = {
Pos = {x = 706.735412597656, y = -960.902893066406, z = 29.3953247070313},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('dd_dress_locker'),
Type = "cloakroom",
Hint = _U('cloak_change'),
GPS = {x = 740.808776855469, y = -970.066650390625, z = 23.4693908691406}
},
Wool = {
Pos = {x = 1978.92407226563, y = 5171.70166015625, z = 46.6391181945801},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = true,
Name = _U('dd_wool'),
Type = "work",
Item = {
{
name = _U('dd_wool'),
db_name= "wool",
time = 3000,
max = 40,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U('dd_pickup'),
GPS = {x = 715.954650878906, y = -959.639587402344, z = 29.3953247070313}
},
BlipInfos = {
Sprite = 366,
Color = 4
},
Fabric = {
Pos = {x = 715.954650878906, y = -959.639587402344, z = 29.3953247070313},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('dd_fabric'),
Type = "work",
Item = {
{
name = _U('dd_fabric'),
db_name= "fabric",
time = 5000,
max = 80,
add = 2,
remove = 1,
requires = "wool",
requires_name = _U('dd_wool'),
drop = 100
}
},
Hint = _U('dd_makefabric'),
GPS = {x = 712.928283691406, y = -970.5869140625, z = 29.3953247070313}
},
Vehicles = {
Clothe = {
Pos = {x = 712.928283691406, y = -970.5869140625, z = 29.3953247070313},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('dd_clothing'),
Type = "work",
Item = {
{
name = _U('dd_clothing'),
db_name= "clothe",
time = 4000,
max = 40,
add = 1,
remove = 2,
requires = "fabric",
requires_name = _U('dd_fabric'),
drop = 100
}
},
Hint = _U('dd_makeclothing'),
GPS = {x = 429.595855712891, y = -807.341613769531, z = 28.4911441802979}
},
Truck = {
Spawner = 1,
Hash = "youga2",
Trailer = "none",
HasCaution = true
}
VehicleSpawner = {
Pos = {x = 740.808776855469, y = -970.066650390625, z = 23.4693908691406},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker= 1,
Blip = false,
Name = _U('spawn_veh'),
Type = "vehspawner",
Spawner = 1,
Hint = _U('spawn_veh_button'),
Caution = 2000,
GPS = {x = 1978.92407226563, y = 5171.70166015625, z = 46.6391181945801}
},
},
VehicleSpawnPoint = {
Pos = {x = 747.31396484375, y = -966.235778808594, z = 23.705005645752},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker= -1,
Blip = false,
Name = _U('service_vh'),
Type = "vehspawnpt",
Spawner = 1,
Heading = 270.1,
GPS = 0
},
Zones = {
VehicleDeletePoint = {
Pos = {x = 693.796325683594, y = -963.010498046875, z = 22.8247337341309},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker= 1,
Blip = false,
Name = _U('return_vh'),
Type = "vehdelete",
Hint = _U('return_vh_button'),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
CloakRoom = {
Pos = {x = 706.73, y = -960.90, z = 29.39},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("dd_dress_locker"),
Type = "cloakroom",
Hint = _U("cloak_change"),
GPS = {x = 740.80, y = -970.06, z = 23.46}
},
Delivery = {
Pos = {x = 429.595855712891, y = -807.341613769531, z = 28.4911441802979},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Marker= 1,
Blip = true,
Name = _U('delivery_point'),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U('delivery'),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 40,
requires = "clothe",
requires_name = _U('dd_clothing'),
drop = 100
}
},
Hint = _U('dd_deliver_clothes'),
GPS = {x = 1978.92407226563, y = 5171.70166015625, z = 46.6391181945801}
}
}
Wool = {
Pos = {x = 1978.92, y = 5171.70, z = 46.63},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = true,
Name = _U("dd_wool"),
Type = "work",
Item = {
{
name = _U("dd_wool"),
db_name = "wool",
time = 3000,
max = 40,
add = 1,
remove = 1,
requires = "nothing",
requires_name = "Nothing",
drop = 100
}
},
Hint = _U("dd_pickup"),
GPS = {x = 715.95, y = -959.63, z = 29.39}
},
Fabric = {
Pos = {x = 715.95, y = -959.63, z = 29.39},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("dd_fabric"),
Type = "work",
Item = {
{
name = _U("dd_fabric"),
db_name = "fabric",
time = 5000,
max = 80,
add = 2,
remove = 1,
requires = "wool",
requires_name = _U("dd_wool"),
drop = 100
}
},
Hint = _U("dd_makefabric"),
GPS = {x = 712.92, y = -970.58, z = 29.39}
},
Clothe = {
Pos = {x = 712.92, y = -970.58, z = 29.39},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("dd_clothing"),
Type = "work",
Item = {
{
name = _U("dd_clothing"),
db_name = "clothe",
time = 4000,
max = 40,
add = 1,
remove = 2,
requires = "fabric",
requires_name = _U("dd_fabric"),
drop = 100
}
},
Hint = _U("dd_makeclothing"),
GPS = {x = 429.59, y = -807.34, z = 28.49}
},
VehicleSpawner = {
Pos = {x = 740.80, y = -970.06, z = 23.46},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Marker = 1,
Blip = false,
Name = _U("spawn_veh"),
Type = "vehspawner",
Spawner = 1,
Hint = _U("spawn_veh_button"),
Caution = 2000,
GPS = {x = 1978.92, y = 5171.70, z = 46.63}
},
VehicleSpawnPoint = {
Pos = {x = 747.31, y = -966.23, z = 23.70},
Size = {x = 3.0, y = 3.0, z = 1.0},
Marker = -1,
Blip = false,
Name = _U("service_vh"),
Type = "vehspawnpt",
Spawner = 1,
Heading = 270.1,
GPS = 0
},
VehicleDeletePoint = {
Pos = {x = 693.79, y = -963.01, z = 22.82},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Marker = 1,
Blip = false,
Name = _U("return_vh"),
Type = "vehdelete",
Hint = _U("return_vh_button"),
Spawner = 1,
Caution = 2000,
GPS = 0,
Teleport = 0
},
Delivery = {
Pos = {x = 429.59, y = -807.34, z = 28.49},
Color = {r = 204, g = 204, b = 0},
Size = {x = 5.0, y = 5.0, z = 3.0},
Marker = 1,
Blip = true,
Name = _U("delivery_point"),
Type = "delivery",
Spawner = 1,
Item = {
{
name = _U("delivery"),
time = 500,
remove = 1,
max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
price = 40,
requires = "clothe",
requires_name = _U("dd_clothing"),
drop = 100
}
},
Hint = _U("dd_deliver_clothes"),
GPS = {x = 1978.92, y = 5171.70, z = 46.63}
}
}
}
+325 -329
View File
@@ -18,7 +18,7 @@ local Blips = {}
local JobBlips = {}
local collectedItem = nil
local collectedQtty = 0
local collectedQtty = 0
local collectedQttyUpToDate = false
local previousCollectedItem = nil
local previousCollectedQtty = 0
@@ -50,229 +50,238 @@ Citizen.CreateThread(function()
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
PlayerData = ESX.GetPlayerData()
end)
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
PlayerData = xPlayer
TriggerServerEvent('esx_jobs:giveBackCautionInCaseOfDrop')
refreshBlips()
PlayerData = xPlayer
TriggerServerEvent('esx_jobs:giveBackCautionInCaseOfDrop')
refreshBlips()
end)
function OpenMenu()
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'cloakroom',
{
title = _U('cloakroom'),
elements = {
{label = _U('job_wear'), value = 'job_wear'},
{label = _U('citizen_wear'), value = 'citizen_wear'}
}
},
function(data, menu)
if data.current.value == 'citizen_wear' then
onDuty = false
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
TriggerEvent('skinchanger:loadSkin', skin)
end)
end
if data.current.value == 'job_wear' then
onDuty = true
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male)
else
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female)
end
end)
end
menu.close()
end,
function(data, menu)
menu.close()
end
)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'cloakroom',
{
title = _U('cloakroom'),
elements = {
{label = _U('job_wear'), value = 'job_wear'},
{label = _U('citizen_wear'), value = 'citizen_wear'}
}
}, function(data, menu)
if data.current.value == 'citizen_wear' then
onDuty = false
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
TriggerEvent('skinchanger:loadSkin', skin)
end)
elseif data.current.value == 'job_wear' then
onDuty = true
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male)
else
TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female)
end
end)
end
menu.close()
end, function(data, menu)
menu.close()
end)
end
AddEventHandler('esx_jobs:action', function(job, zone)
menuIsShowed = true
if zone.Type == "cloakroom" then
OpenMenu()
elseif zone.Type == "work" then
hintToDisplay = "no hint to display"
hintIsShowed = false
local playerPed = GetPlayerPed(-1)
if IsPedInAnyVehicle(playerPed, 0) then
TriggerEvent('esx:showNotification', _U('foot_work'))
else
TriggerServerEvent('esx_jobs:startWork', zone.Item)
end
elseif zone.Type == "vehspawner" then
TriggerServerEvent('esx_jobs:requestPlayerData', 'refresh_bank_account')
local spawnpt = nil
local deliverypt = nil
local vehicle = nil
menuIsShowed = true
if zone.Type == "cloakroom" then
OpenMenu()
elseif zone.Type == "work" then
hintToDisplay = "no hint to display"
hintIsShowed = false
local playerPed = PlayerPedId()
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
for l,w in pairs(v.Zones) do
if (w.Type == "vehspawnpt") and (w.Spawner == zone.Spawner) then
spawnpt = w
spawner = w.Spawner
end
end
for m,x in pairs(v.Vehicles) do
if (x.Spawner == zone.Spawner) then
vehicle = x
end
end
end
end
if IsPedInAnyVehicle(playerPed, false) then
ESX.ShowNotification(U('foot_work'))
else
TriggerServerEvent('esx_jobs:startWork', zone.Item)
end
elseif zone.Type == "vehspawner" then
TriggerServerEvent('esx_jobs:requestPlayerData', 'refresh_bank_account')
local spawnpt = nil
local deliverypt = nil
local vehicle = nil
local caution = zone.Caution
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
for l,w in pairs(v.Zones) do
if (w.Type == "vehspawnpt") and (w.Spawner == zone.Spawner) then
spawnpt = w
spawner = w.Spawner
end
end
if deliverypt == nil then
deliverypt = 0
end
for m,x in pairs(v.Vehicles) do
if (x.Spawner == zone.Spawner) then
vehicle = x
end
end
end
end
TriggerServerEvent('esx_jobs:setCautionInCaseOfDrop', caution)
cautionVehicleInCaseofDrop = caution
maxCautionVehicleInCaseofDrop = cautionVehicleInCaseofDrop
local caution = zone.Caution
spawncar(spawnpt, vehicle)
if deliverypt == nil then
deliverypt = 0
end
elseif zone.Type == "vehdelete" then
local looping = true
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
for l,w in pairs(v.Zones) do
if (w.Type == "vehdelete") and (w.Spawner == zone.Spawner) then
local playerPed = GetPlayerPed(-1)
if IsPedInAnyVehicle(playerPed, 0) then
local vehicle = GetVehiclePedIsIn(playerPed, 0)
local plate = GetVehicleNumberPlateText(vehicle)
plate = string.gsub(plate, " ", "")
local driverPed = GetPedInVehicleSeat(vehicle, -1)
for i=1, #myPlate, 1 do
if (myPlate[i] == plate) and (playerPed == driverPed) then
TriggerServerEvent('esx_jobs:caution', "give_back", cautionVehicleInCaseofDrop, 0, 0)
DeleteVehicle(GetVehiclePedIsIn(playerPed, 0))
TriggerServerEvent('esx_jobs:setCautionInCaseOfDrop', caution)
cautionVehicleInCaseofDrop = caution
maxCautionVehicleInCaseofDrop = cautionVehicleInCaseofDrop
if w.Teleport ~= 0 then
SetEntityCoords(GetPlayerPed(-1), w.Teleport.x, w.Teleport.y, w.Teleport.z)
end
spawncar(spawnpt, vehicle)
table.remove(myPlate, i)
elseif zone.Type == "vehdelete" then
local looping = true
if vehicleObjInCaseofDrop.HasCaution then
cautionVehicleInCaseofDrop = 0
maxCautionVehicleInCaseofDrop = 0
vehicleInCaseofDrop = nil
vehicleHashInCaseofDrop = nil
vehicleMaxHealthInCaseofDrop = nil
vehicleOldHealthInCaseofDrop = nil
vehicleObjInCaseofDrop = nil
TriggerServerEvent('esx_jobs:setCautionInCaseOfDrop', 0)
end
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
for l,w in pairs(v.Zones) do
if w.Type == "vehdelete" and w.Spawner == zone.Spawner then
local playerPed = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) then
local vehicle = GetVehiclePedIsIn(playerPed, 0)
local plate = GetVehicleNumberPlateText(vehicle)
plate = string.gsub(plate, " ", "")
local driverPed = GetPedInVehicleSeat(vehicle, -1)
break
end
end
end
looping = false
break
end
if looping == false then
break
end
end
end
if looping == false then
break
end
end
elseif zone.Type == "delivery" then
if Blips['delivery'] ~= nil then
RemoveBlip(Blips['delivery'])
Blips['delivery'] = nil
end
hintToDisplay = "no hint to display"
hintIsShowed = false
TriggerServerEvent('esx_jobs:startWork', zone.Item)
end
--nextStep(zone.GPS)
for i=1, #myPlate, 1 do
if myPlate[i] == plate and playerPed == driverPed then
TriggerServerEvent('esx_jobs:caution', "give_back", cautionVehicleInCaseofDrop, 0, 0)
DeleteVehicle(GetVehiclePedIsIn(playerPed, 0))
if w.Teleport ~= 0 then
SetEntityCoords(PlayerPedId(), w.Teleport.x, w.Teleport.y, w.Teleport.z)
end
table.remove(myPlate, i)
if vehicleObjInCaseofDrop.HasCaution then
cautionVehicleInCaseofDrop = 0
maxCautionVehicleInCaseofDrop = 0
vehicleInCaseofDrop = nil
vehicleHashInCaseofDrop = nil
vehicleMaxHealthInCaseofDrop = nil
vehicleOldHealthInCaseofDrop = nil
vehicleObjInCaseofDrop = nil
TriggerServerEvent('esx_jobs:setCautionInCaseOfDrop', 0)
end
break
end
end
end
looping = false
break
end
if looping == false then
break
end
end
end
if looping == false then
break
end
end
elseif zone.Type == "delivery" then
if Blips['delivery'] ~= nil then
RemoveBlip(Blips['delivery'])
Blips['delivery'] = nil
end
hintToDisplay = "no hint to display"
hintIsShowed = false
TriggerServerEvent('esx_jobs:startWork', zone.Item)
end
--nextStep(zone.GPS)
end)
function nextStep(gps)
if gps ~= 0 then
if Blips['delivery'] ~= nil then
RemoveBlip(Blips['delivery'])
Blips['delivery'] = nil
end
Blips['delivery'] = AddBlipForCoord(gps.x, gps.y, gps.z)
SetBlipRoute(Blips['delivery'], true)
TriggerEvent('esx:showNotification', _U('next_point'))
end
if gps ~= 0 then
if Blips['delivery'] ~= nil then
RemoveBlip(Blips['delivery'])
Blips['delivery'] = nil
end
Blips['delivery'] = AddBlipForCoord(gps.x, gps.y, gps.z)
SetBlipRoute(Blips['delivery'], true)
ESX.ShowNotification(_U('next_point'))
end
end
AddEventHandler('esx_jobs:hasExitedMarker', function(zone)
TriggerServerEvent('esx_jobs:stopWork')
hintToDisplay = "no hint to display"
menuIsShowed = false
hintIsShowed = false
isInMarker = false
TriggerServerEvent('esx_jobs:stopWork')
hintToDisplay = "no hint to display"
menuIsShowed = false
hintIsShowed = false
isInMarker = false
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
PlayerData.job = job
onDuty = false
myPlate = {} -- loosing vehicle caution in case player changes job.
isJobVehicleDestroyed = false
spawner = 0
deleteBlips()
refreshBlips()
PlayerData.job = job
onDuty = false
myPlate = {} -- loosing vehicle caution in case player changes job.
isJobVehicleDestroyed = false
spawner = 0
deleteBlips()
refreshBlips()
end)
function deleteBlips()
if JobBlips[1] ~= nil then
for i=1, #JobBlips, 1 do
RemoveBlip(JobBlips[i])
JobBlips[i] = nil
end
end
if JobBlips[1] ~= nil then
for i=1, #JobBlips, 1 do
RemoveBlip(JobBlips[i])
JobBlips[i] = nil
end
end
end
function refreshBlips()
local zones = {}
local blipInfo = {}
local zones = {}
local blipInfo = {}
if PlayerData.job ~= nil then
for jobKey,jobValues in pairs(Config.Jobs) do
if PlayerData.job ~= nil then
for jobKey,jobValues in pairs(Config.Jobs) do
if jobKey == PlayerData.job.name then
for zoneKey,zoneValues in pairs(jobValues.Zones) do
if zoneValues.Blip then
local blip = AddBlipForCoord(zoneValues.Pos.x, zoneValues.Pos.y, zoneValues.Pos.z)
SetBlipSprite (blip, jobValues.BlipInfos.Sprite)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 1.2)
SetBlipColour (blip, jobValues.BlipInfos.Color)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(zoneValues.Name)
EndTextCommandSetBlipName(blip)
table.insert(JobBlips, blip)
end
end
end
if jobKey == PlayerData.job.name then
for zoneKey,zoneValues in pairs(jobValues.Zones) do
end
end
if zoneValues.Blip then
local blip = AddBlipForCoord(zoneValues.Pos.x, zoneValues.Pos.y, zoneValues.Pos.z)
SetBlipSprite (blip, jobValues.BlipInfos.Sprite)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 1.2)
SetBlipColour (blip, jobValues.BlipInfos.Color)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(zoneValues.Name)
EndTextCommandSetBlipName(blip)
table.insert(JobBlips, blip)
end
end
end
end
end
end
function spawncar(spawnPoint, vehicle)
@@ -283,51 +292,36 @@ end
RegisterNetEvent('esx_jobs:spawnJobVehicle')
AddEventHandler('esx_jobs:spawnJobVehicle', function(spawnPoint, vehicle)
local playerPed = GetPlayerPed(-1)
local coords = spawnPoint.Pos
local vehicleModel = GetHashKey(vehicle.Hash)
local playerPed = PlayerPedId()
RequestModel(vehicleModel)
while not HasModelLoaded(vehicleModel) do
Citizen.Wait(0)
end
if not IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then
if not IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then
local veh = CreateVehicle(vehicleModel, coords.x, coords.y, coords.z, spawnPoint.Heading, true, false)
ESX.Game.SpawnVehicle(vehicle.Hash, spawnPoint.Pos, spawnPoint.heading, function(spawnedVehicle)
if vehicle.Trailer ~= "none" then
RequestModel(vehicle.Trailer)
if vehicle.Trailer ~= "none" then
ESX.Game.SpawnVehicle(vehicle.Trailer, spawnPoint.Pos, spawnPoint.heading, function(trailer)
AttachVehicleToTrailer(spawnedVehicle, trailer, 1.1)
end)
end
while not HasModelLoaded(vehicle.Trailer) do
Citizen.Wait(0)
end
-- save & set plate
local plate = 'WORK' .. math.random(100, 900)
SetVehicleNumberPlateText(spawnedVehicle, plate)
table.insert(myPlate, plate)
plate = string.gsub(plate, " ", "")
local trailer = CreateVehicle(vehicle.Trailer, coords.x, coords.y, coords.z, spawnPoint.Heading, true, false)
AttachVehicleToTrailer(veh, trailer, 1.1)
end
TaskWarpPedIntoVehicle(playerPed, spawnedVehicle, -1)
isJobVehicleDestroyed = false
SetVehicleHasBeenOwnedByPlayer(veh, true)
SetEntityAsMissionEntity(veh, true, true)
local id = NetworkGetNetworkIdFromEntity(veh)
SetNetworkIdCanMigrate(id, true)
local plate = 'WORK' .. math.random(100, 900)
SetVehicleNumberPlateText(veh, plate)
table.insert(myPlate, plate)
plate = string.gsub(plate, " ", "")
SetVehRadioStation(veh, "OFF")
TaskWarpPedIntoVehicle(playerPed, veh, -1)
isJobVehicleDestroyed = false
if vehicle.HasCaution then
vehicleInCaseofDrop = veh
vehicleHashInCaseofDrop = vehicle.Hash
vehicleObjInCaseofDrop = vehicle
vehicleMaxHealthInCaseofDrop = GetEntityMaxHealth(veh)
vehicleOldHealthInCaseofDrop = vehicleMaxHealthInCaseofDrop
end
end
if vehicle.HasCaution then
vehicleInCaseofDrop = spawnedVehicle
vehicleHashInCaseofDrop = vehicle.Hash
vehicleObjInCaseofDrop = vehicle
vehicleMaxHealthInCaseofDrop = GetEntityMaxHealth(spawnedVehicle)
vehicleOldHealthInCaseofDrop = vehicleMaxHealthInCaseofDrop
end
end)
end
end)
-- Show top left hint
@@ -335,44 +329,43 @@ Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
if hintIsShowed then
SetTextComponentFormat("STRING")
AddTextComponentString(hintToDisplay)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
ESX.ShowHelpNotification(hintToDisplay)
else
Citizen.Wait(1000)
Citizen.Wait(500)
end
end
end)
-- Display markers (only if on duty and the player's job ones)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local zones = {}
if PlayerData.job ~= nil then
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
zones = v.Zones
end
end
while true do
Citizen.Wait(1)
local zones = {}
local coords = GetEntityCoords(GetPlayerPed(-1))
for k,v in pairs(zones) do
if onDuty or v.Type == "cloakroom" or PlayerData.job.name == "reporter" then
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
if PlayerData.job ~= nil then
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
zones = v.Zones
end
end
local coords = GetEntityCoords(PlayerPedId())
for k,v in pairs(zones) do
if onDuty or v.Type == "cloakroom" or PlayerData.job.name == "reporter" then
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
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local coords = GetEntityCoords(GetPlayerPed(-1))
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)
@@ -385,7 +378,7 @@ end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
local coords = GetEntityCoords(GetPlayerPed(-1))
local coords = GetEntityCoords(PlayerPedId())
local position = nil
local zone = nil
@@ -401,7 +394,7 @@ Citizen.CreateThread(function()
end
if IsControlJustReleased(0, Keys['E']) and isInPublicMarker then
ESX.Game.Teleport(GetPlayerPed(-1), position)
ESX.Game.Teleport(PlayerPedId(), position)
isInPublicMarker = false
end
@@ -420,97 +413,100 @@ end)
-- Activate menu when player is inside marker
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
while true do
if PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' then
local zones = nil
local job = nil
Citizen.Wait(1)
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
job = v
zones = v.Zones
end
end
if PlayerData.job ~= nil and PlayerData.job.name ~= 'unemployed' then
local zones = nil
local job = nil
if zones ~= nil then
local coords = GetEntityCoords(GetPlayerPed(-1))
local currentZone = nil
local zone = nil
local lastZone = nil
for k,v in pairs(Config.Jobs) do
if PlayerData.job.name == k then
job = v
zones = v.Zones
end
end
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
if zones ~= nil then
local coords = GetEntityCoords(PlayerPedId())
local currentZone = nil
local zone = nil
local lastZone = nil
if IsControlJustReleased(0, Keys["E"]) and not menuIsShowed and isInMarker then
if onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter" then
TriggerEvent('esx_jobs:action', job, zone)
end
end
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
-- hide or show top left zone hints
if isInMarker and not menuIsShowed then
hintIsShowed = true
if (onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter") and zone.Type ~= "vehdelete" then
hintToDisplay = zone.Hint
hintIsShowed = true
elseif zone.Type == "vehdelete" and (onDuty or PlayerData.job.name == "reporter") then
local playerPed = GetPlayerPed(-1)
if IsPedInAnyVehicle(playerPed, 0) then
local vehicle = GetVehiclePedIsIn(playerPed)
local driverPed = GetPedInVehicleSeat(vehicle, -1)
local isVehicleOwner = false
local plate = GetVehicleNumberPlateText(vehicle)
plate = string.gsub(plate, " ", "")
for i=1, #myPlate, 1 do
Citizen.Trace(myPlate[i])
if (myPlate[i] == plate) and (playerPed == driverPed) then
hintToDisplay = zone.Hint .. "\n" .. _U('security_deposit') .. cautionVehicleInCaseofDrop .. "~s~."
isVehicleOwner = true
break
end
end
if not isVehicleOwner then
hintToDisplay = _U('not_your_vehicle')
end
else
hintToDisplay = _U('in_vehicle')
end
hintIsShowed = true
elseif onDuty and zone.Spawner ~= spawner then
hintToDisplay = _U('wrong_point')
hintIsShowed = true
else
if not isInPublicMarker then
hintToDisplay = "no hint to display"
hintIsShowed = false
end
end
end
if IsControlJustReleased(0, Keys['E']) and not menuIsShowed and isInMarker then
if onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter" then
TriggerEvent('esx_jobs:action', job, zone)
end
end
if isInMarker and not hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = true
end
-- hide or show top left zone hints
if isInMarker and not menuIsShowed then
hintIsShowed = true
if (onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter") and zone.Type ~= "vehdelete" then
hintToDisplay = zone.Hint
hintIsShowed = true
elseif zone.Type == "vehdelete" and (onDuty or PlayerData.job.name == "reporter") then
local playerPed = PlayerPedId()
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_jobs:hasExitedMarker', zone)
end
end
end
end
if IsPedInAnyVehicle(playerPed, false) then
local vehicle = GetVehiclePedIsIn(playerPed)
local driverPed = GetPedInVehicleSeat(vehicle, -1)
local isVehicleOwner = false
local plate = GetVehicleNumberPlateText(vehicle)
plate = string.gsub(plate, " ", "")
for i=1, #myPlate, 1 do
if (myPlate[i] == plate) and (playerPed == driverPed) then
hintToDisplay = zone.Hint .. "\n" .. _U('security_deposit') .. cautionVehicleInCaseofDrop .. "~s~."
isVehicleOwner = true
break
end
end
if not isVehicleOwner then
hintToDisplay = _U('not_your_vehicle')
end
else
hintToDisplay = _U('in_vehicle')
end
hintIsShowed = true
elseif onDuty and zone.Spawner ~= spawner then
hintToDisplay = _U('wrong_point')
hintIsShowed = true
else
if not isInPublicMarker then
hintToDisplay = "no hint to display"
hintIsShowed = false
end
end
end
if isInMarker and not hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = true
end
if not isInMarker and hasAlreadyEnteredMarker then
hasAlreadyEnteredMarker = false
TriggerEvent('esx_jobs:hasExitedMarker', zone)
end
end
end
end
end)
-- VEHICLE CAUTION
-- Vehicle caution
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
@@ -552,7 +548,7 @@ Citizen.CreateThread(function()
RequestIpl("CS1_02_cf_onmission3")
RequestIpl("CS1_02_cf_onmission4")
-- Textil
-- Tailor
RequestIpl("id2_14_during_door")
RequestIpl("id2_14_during1")
end)
+3 -1
View File
@@ -4,6 +4,7 @@ Config.Locale = 'fr'
Config.Jobs = {}
Config.PublicZones = {
EnterBuilding = {
Pos = { x = -118.21381378174, y = -607.14227294922, z = 35.280723571777 },
Size = {x = 3.0, y = 3.0, z = 0.2},
@@ -26,5 +27,6 @@ Config.PublicZones = {
Type = "teleport",
Hint = _U('public_leave'),
Teleport = { x = -113.07, y = -604.93, z = 35.28 },
},
}
}
+11 -12
View File
@@ -10,12 +10,11 @@ Locales['br'] = {
['foot_work'] = 'você deve estar a pé para poder trabalhar.',
['next_point'] = 'vá para o próximo passo depois de completar este.',
['security_deposit'] = 'a segurança dada será ~g~$',
['not_your_vehicle'] = "este não é o seu veículo ou você deve ser um motorista.",
['not_your_vehicle'] = 'este não é o seu veículo ou você deve ser um motorista.',
['in_vehicle'] = 'você deve estar em um veículo.',
['wrong_point'] = "você não está no ponto certo de entrega.",
['max_limit'] = 'você tem o máximo: ',
['not_enough'] = "você não tem o suficiente",
['not_enough2'] = ' Para continuar esta tarefa.',
['wrong_point'] = 'você não está no ponto certo de entrega.',
['max_limit'] = 'você tem o máximo: %s',
['not_enough'] = 'você não tem o suficiente %s para continuar esta tarefa.',
['caution_taken'] = ' ~s~foi tirado de você.',
['caution_returned'] = ' ~s~foi devolvido a você.',
['spawn_veh'] = 'Veiculo Spawnado',
@@ -30,7 +29,7 @@ Locales['br'] = {
['public_leave'] = 'pressione ~INPUT_PICKUP~ para ir à entrada do edifício.',
-- Trabalho de Lenhador
['lj_locker_room'] = "Vestiario Lenhador",
['lj_locker_room'] = 'Vestiario Lenhador',
['lj_mapblip'] = 'pilha de madeira',
['lj_wood'] = 'madeira',
['lj_pickup'] = 'pressione ~INPUT_PICKUP~ para recuperar madeira.',
@@ -43,7 +42,7 @@ Locales['br'] = {
['lj_deliver_button'] = 'pressione ~INPUT_PICKUP~ para entregar as tábuas.',
-- Pescador
['fm_fish_locker'] = "Vestiario Pescador",
['fm_fish_locker'] = 'Vestiario Pescador',
['fm_fish'] = 'peixe',
['fm_fish_area'] = 'area de pesca',
['fm_fish_button'] = 'pressione ~INPUT_PICKUP~ para pescar.',
@@ -65,10 +64,10 @@ Locales['br'] = {
['f_gas'] = 'gasolina',
['f_fuel_mixture_button'] = 'pressione ~INPUT_PICKUP~ para misturar.',
['f_deliver_gas'] = 'Entregar Gasolina',
['f_deliver_gas_button'] = "pressione ~INPUT_PICKUP~ para entregar a gasolina.",
['f_deliver_gas_button'] = 'pressione ~INPUT_PICKUP~ para entregar a gasolina.',
-- Minerador
['m_miner_locker'] = "Vestiario Minerador",
['m_miner_locker'] = 'Vestiario Minerador',
['m_rock'] = ' Pedregulho',
['m_pickrocks'] = 'pressione ~INPUT_PICKUP~ para obter pedras.',
['m_washrock'] = ' pedras limpas ',
@@ -81,7 +80,7 @@ Locales['br'] = {
['m_sell_iron'] = 'vender ferro',
['m_deliver_iron'] = 'pressione ~INPUT_PICKUP~ para entregar ferro.',
['m_gold'] = ' ouro',
['m_sell_gold'] = "vender ouro",
['m_sell_gold'] = 'vender ouro',
['m_deliver_gold'] = 'pressione ~INPUT_PICKUP~ para entregar ouro.',
['m_diamond'] = ' diamante',
['m_sell_diamond'] = 'vender diamante',
@@ -93,7 +92,7 @@ Locales['br'] = {
['reporter_garage'] = 'Pressione ~INPUT_PICKUP~ para descer à garagem.',
-- Abatedor
['s_slaughter_locker'] = "Vestiario Abatedor",
['s_slaughter_locker'] = 'Vestiario Abatedor',
['s_hen'] = 'galinheiro',
['s_alive_chicken'] = 'galinha viva',
['s_catch_hen'] = 'pressione ~INPUT_PICKUP~ para pegar galinha viva.',
@@ -107,7 +106,7 @@ Locales['br'] = {
['s_deliver'] = 'pressione ~INPUT_PICKUP~ para entregar as bandejas de frango.',
-- Costureiro
['dd_dress_locker'] = "Vestiario Costureiro",
['dd_dress_locker'] = 'Vestiario Costureiro',
['dd_wool'] = '',
['dd_pickup'] = 'pressione ~INPUT_PICKUP~ para obter lã.',
['dd_fabric'] = 'tecido',
-41
View File
@@ -1,41 +0,0 @@
Locales['de'] = {
-- Global menus
['bank_deposit_g'] = 'eine Kaution von ~g~',
['bank_deposit_r'] = 'eine Kaution von ~g~$',
['bank_deposit2'] = '$ ~s~wurde nach deiner Ohmacht getätigt.',
['foot_work'] = 'du musst zu Fuß sein um arbeiten zu können.',
['next_point'] = 'gehe zum nächsten Schritt wenn du hier fertig bist.',
['security_deposit'] = 'die Kaution beträgt ~g~$',
['not_your_vehicle'] = "Das ist nicht dein Fahrzeug oder du musst der Fahrer sein.",
['in_vehicle'] = 'du musst in einem Fahrzeug sein.',
['wrong_point'] = "Du bist nicht am richtigen Punkt zum liefern.",
['max_limit'] = 'Du hast das Maximum: ',
['not_enough'] = "du hast nicht genug",
['not_enough2'] = ' umd die Aktion fortzuführen.',
['caution_taken'] = ' ~s~wurde von dir abgezogen.',
['caution_returned'] = ' ~s~wurde dir zurück gegeben.',
['public_enter'] = 'drücke ~INPUT_PICKUP~ um das Gebäude zu betreten.',
['public_leave'] = 'drücke ~INPUT_PICKUP~ um das Gebäude zu verlassen.',
['reporter_name'] = 'arbeitsamt',
-- Lumber Jack job
['lj_cr_title'] = 'Garderobe',
['lj_cloakroom'] = 'Drücke ~INPUT_PICKUP~ um dich umzuziehen.',
['lj_mapblip'] = 'Holzstappel',
['lj_wood'] = 'Holz',
['lj_pickup'] = 'Drücke ~INPUT_PICKUP~ um Holz zu bekommen.',
['lj_cutwood'] = 'schlage Holz',
['lj_cutwood_button'] = 'Drücke ~INPUT_PICKUP~ um Bäume zu fällen.',
['lj_board'] = 'Bretter',
['lj_planks'] = 'Bretterpaket',
['lj_delivery'] = 'liefern',
['lj_cutwood'] = 'Holz schneiden',
['lj_pick_boards'] = 'Drücke ~INPUT_PICKUP~ um Bretter zu erhalten.',
['lj_spawn_veh'] = 'Fahrzeug spawnen',
['lj_spawn_veh_button'] = 'Drücke ~INPUT_PICKUP~ um das Lieferfahrzeug zu rufen.',
['lj_service_vh'] = 'Service Fahrzeug',
['lj_return_vh'] = 'Fahrzeug parken',
['lj_delivery_point'] = 'Lieferpunkt',
['lj_return_vh_button'] = 'Drücke ~INPUT_PICKUP~ um das Fahrzeug zu parken.',
['lj_deliver_button'] = 'Drücke ~INPUT_PICKUP~ um die Bretter zu liefern.'
}
+11 -12
View File
@@ -10,12 +10,11 @@ Locales['en'] = {
['foot_work'] = 'you have to be on foot to be able to work.',
['next_point'] = 'go to the next step after completing this one.',
['security_deposit'] = 'you will be given ~g~$',
['not_your_vehicle'] = "this is not your vehicle or you must be a driver.",
['not_your_vehicle'] = 'this is not your vehicle or you must be a driver.',
['in_vehicle'] = 'you must be in a vehicle.',
['wrong_point'] = "you are not at the right point of delivery.",
['max_limit'] = 'you have the maximum: ',
['not_enough'] = "you do not have enough",
['not_enough2'] = ' to continue this task.',
['wrong_point'] = 'you are not at the right point of delivery.',
['max_limit'] = 'you have cannot carry more: %s',
['not_enough'] = 'you do not have enough %s to continue this task.',
['caution_taken'] = ' ~s~was taken from you.',
['caution_returned'] = ' ~s~was returned to you.',
['spawn_veh'] = 'spawn vehicle',
@@ -30,7 +29,7 @@ Locales['en'] = {
['public_leave'] = 'press ~INPUT_PICKUP~ to go to the entrance of the building.',
-- Lumber Jack job
['lj_locker_room'] = "lumberjack's Locker Room",
['lj_locker_room'] = 'lumberjack\'s Locker Room',
['lj_mapblip'] = 'wood pile',
['lj_wood'] = 'wood',
['lj_pickup'] = 'press ~INPUT_PICKUP~ to retrieve wood.',
@@ -43,7 +42,7 @@ Locales['en'] = {
['lj_deliver_button'] = 'press ~INPUT_PICKUP~ to deliver the boards.',
-- Fisherman
['fm_fish_locker'] = "fishermen's Locker Room",
['fm_fish_locker'] = 'fishermen\'s Locker Room',
['fm_fish'] = 'fish',
['fm_fish_area'] = 'fishing area',
['fm_fish_button'] = 'press ~INPUT_PICKUP~ to fish.',
@@ -65,10 +64,10 @@ Locales['en'] = {
['f_gas'] = 'gas',
['f_fuel_mixture_button'] = 'press ~INPUT_PICKUP~ to mix.',
['f_deliver_gas'] = 'deliver Gas',
['f_deliver_gas_button'] = "press ~INPUT_PICKUP~ to deliver gasoline.",
['f_deliver_gas_button'] = 'press ~INPUT_PICKUP~ to deliver gasoline.',
-- Miner
['m_miner_locker'] = "miner's Locker Room",
['m_miner_locker'] = 'miner\'s Locker Room',
['m_rock'] = 'rock',
['m_pickrocks'] = 'press ~INPUT_PICKUP~ to retrieve rocks.',
['m_washrock'] = 'rock Washing',
@@ -81,7 +80,7 @@ Locales['en'] = {
['m_sell_iron'] = 'iron Seller',
['m_deliver_iron'] = 'press ~INPUT_PICKUP~ to deliver the iron.',
['m_gold'] = 'gold',
['m_sell_gold'] = "gold Seller",
['m_sell_gold'] = 'gold Seller',
['m_deliver_gold'] = 'press ~INPUT_PICKUP~ to deliver the gold.',
['m_diamond'] = 'diamond',
['m_sell_diamond'] = 'diamond Seller',
@@ -93,7 +92,7 @@ Locales['en'] = {
['reporter_garage'] = 'Press ~INPUT_PICKUP~ to go down to the garage.',
-- Slaughterer
['s_slaughter_locker'] = "butcher's Locker Room",
['s_slaughter_locker'] = 'butcher\'s Locker Room',
['s_hen'] = 'chicken coop',
['s_alive_chicken'] = 'live Chicken',
['s_catch_hen'] = 'press ~INPUT_PICKUP~ to catch live chickens.',
@@ -107,7 +106,7 @@ Locales['en'] = {
['s_deliver'] = 'press ~INPUT_PICKUP~ to deliver the chicken trays.',
-- Dress Designer
['dd_dress_locker'] = "dress Designer's Locker Room",
['dd_dress_locker'] = 'dress Designer\'s Locker Room',
['dd_wool'] = 'wool',
['dd_pickup'] = 'press ~INPUT_PICKUP~ to retrieve wool.',
['dd_fabric'] = 'fabric',
+2 -3
View File
@@ -13,9 +13,8 @@ Locales['fi'] = {
['not_your_vehicle'] = "tämä ei ole sinun ajoneuvo tai et ole sen kuski",
['in_vehicle'] = 'sinun täytyy olla ajoneuvossa',
['wrong_point'] = "et ole oikeassa paikassa",
['max_limit'] = 'sinulla on jo maksimi määrä: ',
['not_enough'] = "sinulla ei ole tarpeeksi ",
['not_enough2'] = ' jatkaaksesi täällä.',
['max_limit'] = 'sinulla on jo maksimi määrä: %s',
['not_enough'] = 'sinulla ei ole tarpeeksi %s jatkaaksesi täällä.',
['caution_taken'] = ' ~s~otettiin sinulta.',
['caution_returned'] = ' ~s~palautettiin sinulle.',
['spawn_veh'] = 'spawnaa ajoneuvo',
+2 -3
View File
@@ -13,9 +13,8 @@ Locales['fr'] = {
['not_your_vehicle'] = "ce n'est pas votre véhicule ou vous devez être conducteur.",
['in_vehicle'] = 'vous devez être dans un véhicule.',
['wrong_point'] = "vous n'êtes pas au bon point de livraison.",
['max_limit'] = 'vous avez le maximum de: ',
['not_enough'] = "vous n'avez plus assez de",
['not_enough2'] = ' pour continuer cette tâche.',
['max_limit'] = 'vous avez le maximum de: %s',
['not_enough'] = 'vous n\'avez plus assez de %s pour continuer cette tâche.',
['caution_taken'] = ' ~s~vous a été prélevée.',
['caution_returned'] = ' ~s~vous a été rendue.',
['spawn_veh'] = 'spawner véhicule de fonction',
+4 -5
View File
@@ -1,10 +1,10 @@
Locales['sv'] = {
-- Global menus
['cloakroom'] = 'Omklädningsrum',
['cloakroom'] = 'omklädningsrum',
['cloak_change'] = 'tryck ~INPUT_PICKUP~ för att byta kläder.',
['citizen_wear'] = 'civilkläder',
['job_wear'] = 'arbetskläder',
['bank_deposit_g'] = 'en deposition på ~g~$',
['bank_deposit_g'] = 'en deposition på ~g~$',
['bank_deposit_r'] = 'en deposition på ~r~$',
['bank_deposit2'] = '$ ~s~was made to you after your fainting.',
['foot_work'] = 'du måste vara till fots för att kunna arbeta.',
@@ -13,9 +13,8 @@ Locales['sv'] = {
['not_your_vehicle'] = "det här är inte ditt fordon eller så måste du vara föraren.",
['in_vehicle'] = 'du måste vara i ett fordon.',
['wrong_point'] = "du är inte på rätt leveranspunkt.",
['max_limit'] = 'du har det maximala antalet: ',
['not_enough'] = "du har inte tillräckligt",
['not_enough2'] = ' för att fortsätta denna uppgift.',
['max_limit'] = 'du kan inte bära mer: %s',
['not_enough'] = "du har inte tillräckligt med %s för att fortsätta denna uppgift.",
['caution_taken'] = ' ~s~togs från dig.',
['caution_returned'] = ' ~s~återvände till dig.',
['spawn_veh'] = 'spawn vehicle',
+81 -83
View File
@@ -5,122 +5,120 @@ ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
AddEventHandler('esx:playerLoaded', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.set('caution', 0)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.set('caution', 0)
end)
AddEventHandler('esx:playerDropped', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local caution = xPlayer.get('caution')
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
account.addMoney(caution)
end)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local caution = xPlayer.get('caution')
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
account.addMoney(caution)
end)
end)
RegisterServerEvent('esx_jobs:setCautionInCaseOfDrop')
AddEventHandler('esx_jobs:setCautionInCaseOfDrop', function(caution)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.set('caution', caution)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.set('caution', caution)
end)
RegisterServerEvent('esx_jobs:giveBackCautionInCaseOfDrop')
AddEventHandler('esx_jobs:giveBackCautionInCaseOfDrop', function()
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
local caution = account.money
account.removeMoney(caution)
if caution > 0 then
xPlayer.addAccountMoney('bank', caution)
TriggerClientEvent('esx:showNotification', _source, _U('bank_deposit_g').. caution .. _U('bank_deposit2'))
end
end)
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
local caution = account.money
account.removeMoney(caution)
if caution > 0 then
xPlayer.addAccountMoney('bank', caution)
TriggerClientEvent('esx:showNotification', _source, _U('bank_deposit_g').. caution .. _U('bank_deposit2'))
end
end)
end)
local function Work(source, item)
SetTimeout(item[1].time, function()
if PlayersWorking[source] == true then
SetTimeout(item[1].time, function()
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer == nil then
return
end
if PlayersWorking[source] == true then
for i=1, #item, 1 do
local itemQtty = 0
if item[i].name ~= _U('delivery') then
itemQtty = xPlayer.getInventoryItem(item[i].db_name).count
end
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer == nil then
return
end
local requiredItemQtty = 0
if item[1].requires ~= "nothing" then
requiredItemQtty = xPlayer.getInventoryItem(item[1].requires).count
end
for i=1, #item, 1 do
local itemQtty = 0
if item[i].name ~= _U('delivery') then
itemQtty = xPlayer.getInventoryItem(item[i].db_name).count
end
if item[i].name ~= _U('delivery') and itemQtty >= item[i].max then
TriggerClientEvent('esx:showNotification', source, _U('max_limit') .. item[i].name)
elseif item[i].requires ~= "nothing" and requiredItemQtty <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough') .. item[1].requires_name .. _U('not_enough2'))
else
if item[i].name ~= _U('delivery') then
-- Chances to drop the item
if item[i].drop == 100 then
xPlayer.addInventoryItem(item[i].db_name, item[i].add)
else
local chanceToDrop = math.random(100)
if chanceToDrop <= item[i].drop then
xPlayer.addInventoryItem(item[i].db_name, item[i].add)
end
end
else
xPlayer.addMoney(item[i].price)
end
local requiredItemQtty = 0
if item[1].requires ~= "nothing" then
requiredItemQtty = xPlayer.getInventoryItem(item[1].requires).count
end
end
end
if item[i].name ~= _U('delivery') and itemQtty >= item[i].max then
TriggerClientEvent('esx:showNotification', source, _U('max_limit', item[i].name))
elseif item[i].requires ~= "nothing" and requiredItemQtty <= 0 then
TriggerClientEvent('esx:showNotification', source, _U('not_enough', item[1].requires_name))
else
if item[i].name ~= _U('delivery') then
-- Chances to drop the item
if item[i].drop == 100 then
xPlayer.addInventoryItem(item[i].db_name, item[i].add)
else
local chanceToDrop = math.random(100)
if chanceToDrop <= item[i].drop then
xPlayer.addInventoryItem(item[i].db_name, item[i].add)
end
end
else
xPlayer.addMoney(item[i].price)
end
end
end
if item[1].requires ~= "nothing" then
local itemToRemoveQtty = xPlayer.getInventoryItem(item[1].requires).count
if itemToRemoveQtty > 0 then
xPlayer.removeInventoryItem(item[1].requires, item[1].remove)
end
end
Work(source, item)
if item[1].requires ~= "nothing" then
local itemToRemoveQtty = xPlayer.getInventoryItem(item[1].requires).count
if itemToRemoveQtty > 0 then
xPlayer.removeInventoryItem(item[1].requires, item[1].remove)
end
end
end
end)
Work(source, item)
end
end)
end
RegisterServerEvent('esx_jobs:startWork')
AddEventHandler('esx_jobs:startWork', function(item)
local source = source
PlayersWorking[source] = true
Work(source, item)
PlayersWorking[source] = true
Work(source, item)
end)
RegisterServerEvent('esx_jobs:stopWork')
AddEventHandler('esx_jobs:stopWork', function()
local source = source
PlayersWorking[source] = false
PlayersWorking[source] = false
end)
RegisterServerEvent('esx_jobs:caution')
AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPoint, vehicle)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
if cautionType == "take" then
xPlayer.removeAccountMoney('bank', cautionAmount)
xPlayer.set('caution', cautionAmount)
TriggerClientEvent('esx:showNotification', source, _U('bank_deposit_r') .. cautionAmount .. _U('caution_taken'))
TriggerClientEvent('esx_jobs:spawnJobVehicle', source, spawnPoint, vehicle)
elseif cautionType == "give_back" then
xPlayer.addAccountMoney('bank', cautionAmount)
xPlayer.set('caution', 0)
TriggerClientEvent('esx:showNotification', source, _U('bank_deposit_g') .. cautionAmount .. _U('caution_returned'))
end
local xPlayer = ESX.GetPlayerFromId(source)
if cautionType == "take" then
xPlayer.removeAccountMoney('bank', cautionAmount)
xPlayer.set('caution', cautionAmount)
TriggerClientEvent('esx:showNotification', source, _U('bank_deposit_r') .. cautionAmount .. _U('caution_taken'))
TriggerClientEvent('esx_jobs:spawnJobVehicle', source, spawnPoint, vehicle)
elseif cautionType == "give_back" then
xPlayer.addAccountMoney('bank', cautionAmount)
xPlayer.set('caution', 0)
TriggerClientEvent('esx:showNotification', source, _U('bank_deposit_g') .. cautionAmount .. _U('caution_returned'))
end
end)