-
This is the first work from svejdarpa_jobs, where you must harvest barley
-
You don’t need have a fixed job or faction
-
In this script, in the future, we plan four - five works /brigades where you can do any interesting works.
-
If you buy this script, you get second job in free update.
The whole script is explain and describe in the video
| Steps For Use:
- Import file importIntoDatabase.sql into your database
- add item brigades_emptybag_barley into your shop
- write script name into server.cfg
- You can change location of everything in Config
- Restart the server
| Resmon, if you are not in any job location
| Resmon, if you talk with NPC
| Resmon, if you harvest a barley
| Video: SvejdaJobs
| Price: 6.6€ + tax
| Created by: Svejdarpa#4136
Buy: https://svejdascripts.tebex.io/package/4548436
| Everything is configurable
local PedIndentation = 0.950
Config = {}
Config.Locale = 'en' -- Language - [en] english/[cs] czech
Config.ResourceName = 'svejdarpa_jobs' -- If you change resource name you must change it here too
Config.EnableTalks = true -- Enable peds talks
Config.TextFont = 0 -- Font in 3D text and 2D text
Config.CustomFloatingHelpTextFont = true -- DEFAUT-FALSE, If you have on server custom font, you can use it in functions -> ShowFloatingHelpNotification
Config.Text3D = 3.8 -- Distance of visibility FloatingHelpNotification and 3D text
Config.Text2Dinteraction = 1.7 -- Distance of visibility 2D text
Config.DebugMode = false -- Debug mode allow my print's into console
Config.Text2DPos_x = 0.95 -- 2D TEXT X position
Config.Text2DPos_y = 1.41 -- 2D TEXT Y position
Config.AdminAlert = true -- If is on server any not allowed action, groups who are write in function --> ChatNotificationAllert(type) <-- get info into chat
-- IF AdminAlert IS FALSE, not allowed actions will be display only into server console
-- IF AdminAlert IS TRUE, you MUST set --> ChatNotificationAllert(type)
--============================================
--=== EMPLOYMENT OFFICE ===
--============================================
Config.EmploymentOfficerBlip = { -- EMPLOYMENT OFFICE BLIP
Sprite = 407, -- Sprite
Scale = 1.2, -- Scale
Color = 63 -- Color
}
Config.EmploymentOfficerPed = 'a_m_m_business_01' -- PED in EMPLOYMENT DEPARTMENT
Config.EmploymentOfficerPedVoice = 'MICHAEL_NORMAL' -- PED VOICE in EMPLOYMENT DEPARTMENT
Config.EmploymentOfficerPedSpawnLoc = {x = -261.46, y = -964.22, z = 31.19 - PedIndentation, h = 179.68} -- PED SPAWN LOCATION
--VISIBILITY - if you don't need change this, set same as PedSpawnLo
Config.EmploymentOfficerPedVisibleLoc = {x = -261.46, y = -964.22, z = 31.22}
--AUDIBILITY - if you don't need change this, set same as PedSpawnLo
Config.EmploymentOfficerPedListenLoc = {x = -261.46, y = -964.22, z = 31.22}
Config.EmploymentOfficerTextOdsazeni = 1.85 -- Distance between Ped head and his Text on the head
Config.EmploymentOfficerPedSpawnDistance = 25 -- Distance from your position between Ped's threads start and ped spawn
Config.EmploymentOfficerPedListenDistance = 2.5 -- Distance from your position and Ped where you hear PED
--=================================
--=== FARMER ===
--=================================
Config.FarmerBlip = { -- JOB BLIP - you can display only in employment department
Sprite = 478, -- type
Scale = 0.8, -- scale
Color = 17 -- color
}
Config.FarmerGameCrashedProtection = true -- DONT TOUCH ON THIS!!!, In next update we do it defaultly. This save total count of saved barley in storage INTO DATABASE after game crashed, and a little bit protect from cheaters
Config.BarleyPrice = 1 -- Price in $ for one barley
Config.BagPrice = 5 -- Price in $ for one bag for barley
Config.CollectBarleyMin = 1 -- How many barleys you can collect minimally
Config.CollectBarleyMax = 3 -- How many barleys you can collect maximally
Config.MaxBarleyBagInInventory = 1 -- How many bags with barley you can have in inventory
Config.MaxBarleyInInventory = 20 -- How many barleys you can have in inventory
Config.MaxBarleyInInventoryWithBag = 50 -- How many barleys you can have in inventory, if you have bag on barley in inventory
Config.FarmerPed = 's_m_m_dockwork_01' -- Farmer Ped
Config.FarmerPedVoice = 'TREVOR_NORMAL' -- Farmer Ped Voice Type
Config.FarmerPedSpawnLoc = {x = 1237.71, y = 1864.97, z = 78.92 - PedIndentation, h = 219.98} -- Farmer Ped Spawn Location
Config.FarmerTextOdsazeni = 1.83 -- Distance between Ped head and his Text on the head
Config.FarmerPedSpawnDistance = 70 -- Distance from your position between Ped's threads start and ped spawn
Config.FarmerPedListenDistance = 15 -- Distance from your position and Ped where you hear PED
Config.EnableBeweryJob = false -- FOR OUR SERVER, FOR ANOTHER JOB, FALSE = DEFAULT
--VISIBILITY - if you don't need change this, set same as PedSpawnLoc
Config.FarmerPedVisibleLoc = {x = 1245.79, y = 1857.54, z = 79.53}
--AUDIBILITY - if you don't need change this, set same as PedSpawnLoc
Config.FarmerPedListenLoc = {x = 1237.71, y = 1864.97, z = 78.92}
--FIELD WITH BARLEY - markers and zones
Config.BarleyCustomMarker = true -- Dont Touch This!! this allow custom marker of barley in this script
if Config.BarleyCustomMarker then
Config.BarleyMarker = {
Type = 3,
Size = {x = 0.8, y = 0.8, z = 1.0},
Color = {r = 255, g = 255, b = 255, a = 255}
}
end
Config.FieldLocation = {x = 1265.79, y = 1839.79, z = 82.46, visibility = 40.0} -- Field Location and visibility of markers
Config.CollectPoint = { -- Settings of marker for storage
Type = 27,
Size = {x = 1.5, y = 1.5, z = 1.5},
Color = {r = 255, g = 255, b = 0, a = 250},
Pos = {x = 1243.53, y = 1869.09, z = 78.07},
Visibility = 40.0
}
Config.MarkerLocations = { -- BARLEY COLLECT POINTS
-- first field line
{number = 1, x = 1251.91, y = 1852.7, z = 80.26},
{number = 2, x = 1255.41, y = 1850.47, z = 80.77},
{number = 3, x = 1258.2, y = 1848.69, z = 81.2},
{number = 4, x = 1261.56, y = 1846.65, z = 81.71},
{number = 5, x = 1264.6, y = 1844.73, z = 82.2},
{number = 6, x = 1268.49, y = 1842.45, z = 82.76},
{number = 7, x = 1271.8, y = 1840.16, z = 83.27},
{number = 8, x = 1275.84, y = 1837.33, z = 83.75},
-- second field line
{number = 9, x = 1273.66, y = 1834.14, z = 83.53},
{number = 10, x = 1269.3, y = 1837.15, z = 82.98},
{number = 11, x = 1265.78, y = 1839.5, z = 82.47},
{number = 12, x = 1262.35, y = 1841.93, z = 81.97},
{number = 13, x = 1258.95, y = 1844.09, z = 81.48},
{number = 14, x = 1256.01, y = 1846.04, z = 81.04},
{number = 15, x = 1253.72, y = 1847.31, z = 80.7},
{number = 16, x = 1250.21, y = 1849.08, z = 80.1},
}
--========================================
--=== Item Names ===
--========================================
-- Here you can use your own item name as you use in database
--===========FARMER=======================
Config.itemBarleyName = 'brigades_barley'
Config.itemEmptyBagName = 'brigades_emptybag_barley'
Config.itemFillBagName = 'brigades_fillbag_barley'
--========================================
--=== NOTIFICATIONS ===
--========================================
-- Down you can implement your own notification exports
function ClientNotification(type, text)
if type == 'error' then
exports['mythic_notify']:SendAlert('error', text)
elseif type == 'success' then
exports['mythic_notify']:SendAlert('success', text)
elseif type == 'inform' then
exports['mythic_notify']:SendAlert('inform', text)
end
end
--========================================================
--=== CHAT NOTIFICATIONS AFTER NOT ALLOWED ACTION ===
--========================================================
--IF YOU WANT USE THIS, PLEASE SET IT IN YOUR TYPE OF CHAT, OR DISABLE AdminAlert
function ChatNotificationAllert(type, src)
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayero = ESX.GetPlayerFromId(xPlayers[i])
local group = xPlayero.getGroup()
if type == 'barley' then
if group == 'admin' or group == 'mod' or group == 'dev' or group == 'superadmin' then
TriggerClientEvent('chat:addMessage', xPlayers[i], {args = {_U('farmerAlertBarley', src)}, color = { 255, 0, 0 } })
TriggerClientEvent('chat:addMessage', xPlayers[i], {args = {_U('farmerAlertBarley', src)}, color = { 255, 0, 0 } })
end
elseif type == 'cash' then
if group == 'admin' or group == 'mod' or group == 'dev' or group == 'superadmin' then
TriggerClientEvent('chat:addMessage', xPlayers[i], {args = {_U('farmerAlertCash', src)}, color = { 255, 0, 0 } })
TriggerClientEvent('chat:addMessage', xPlayers[i], {args = {_U('farmerAlertCash', src)}, color = { 255, 0, 0 } })
end
end
end
end