It was a lot more work than anticipated but it’s finally releaseable.
I put a lot of thought into this and I think a lot of RP servers can benefit from this since it not only creates a more immersive experience, it also tackles some problems (i.e. meta-jobs, job-idling)
This ESX script creates an immersive jobcenter experience on your server. It replaces scripts like esx_joblisting and adds a lot of features that benefit your server. I think it differs a lot from other jobcenter scripts.
Features:
- Players have to take a number and wait for their turn
- Players always get (1 - 6) suggestions of the least occupied jobs. (prevents only using the meta jobs)
Jobs are assigned through a document (see below) instead of a simple menu - Players only get the job suggestions to jobs they have the license for (i.e. driving, truck or weapon license)
- When using the jobcenter-job players can get their job in RP situation (no need for admins to give whitelisted jobs OOC)
Jobcenter employees have access to a nui interface mimicing computer - Jobcenter employees can be paid solely or extra when in duty
- If employees of the jobcenter that are in duty leave the premise or the server they are automatically signed off duty
- You can prevent job idling by activating the job timer. If players don’t do their job they are getting fired.
- Of course you can add your own server logo and name
The logo in this picture is by JulyGee
You can use any MLO or place you like but you need to edit the coords in the config file.
If you want to save yourself the work you can use this nice Jobcenter MLO from VerpiMoDz
which I used for my config. You can find it here for free. Be a cool person and leave a nice comment!
https://forum.cfx.re/t/mlo-los-santos-job-centre/1500587
Config = {}
Config.Locale = 'en'
Config.ESXSHAREDOBJECT = 'esx:getSharedObject' --If you don't know what this is you better not touch it :D
Config.BlipSprite = 475 -- The style of the blip. https://docs.fivem.net/docs/game-references/blips/#blips
Config.BlipDisplay = 4 -- https://docs.fivem.net/natives/?_0x9029B2F3DA924928
Config.BlipScale = 1.0 -- The size of the Blip
Config.BlipColor = 0 -- The color of the blip. https://docs.fivem.net/docs/game-references/blips/#blip-colors
Config.BlipShortRange = true -- True to only display the blip as 'short range', false to display the blip from a longer distance.
Config.Volume = 0.5 -- Volume of the sounds ('next', 'computer', etc..)
Config.WaitTime = 30 -- The time the announced numbers take to switch to the next one (in seconds, default: 30)
Config.ExtraTime = 15 -- The extra time thats added to the WaitTime if a player opens the jobmenu (in seconds, default: 15)
Config.MaxSuggestions = 6 -- How many jobs a player should get suggested. (1-6 are possible)
Config.EnableMarker = true -- Enable disable markers
Config.EnableInfoText = true -- Enable disable the info text in the upper left corner
Config.MarkerSize = {x = 0.3, y = 0.3, z = 0.3} -- The size of the markers
Config.MarkerColor = {r = 0, g = 128, b = 128} -- The color of the 'take a number' marker
Config.UnMarkerColor = {r = 128, g = 0, b = 30} -- The color of the unemploy marker
Config.MarkerType = 2 -- The marker style https://docs.fivem.net/docs/game-references/markers/
Config.Rotation = -20.0 -- The marker orientation
Config.MarkerDistance = 2 -- The drawdistance of the markers
Config.EnableStandUpKey = false -- Most servers already have some kind of key to stop animations (comes with i.e. dpemotes) If you don't have one you can activate standing up here.
Config.StandUpKey = 73 -- Default button is 'X' (73) if you want to change it here are the numbers: https://docs.fivem.net/docs/game-references/controls/#controls
Config.DutyPay = true -- If jobcenter employees should get paid extra when in duty
Config.payInterval = 20 -- The interval in which the payment should occur
Config.dutyPayment = 300 -- How much money should be payed each time
Config.JobTimer = true -- If you want to players to lose their job after some time if they do not practise their job (check readme!)
Config.TimerInterval = 5 -- The jobtimer adds x every x minutes to the players timer. (in minutes, default 5)
Config.JobcenterRange = 17 -- The range of the jobcenter. If a employee leaves this range he/she is signed out of duty.
Config.Middle = vector3(-243.67, -910.69, 32.29) -- The middle of the jobcenter (used for jobcenter range)
Config.InLocation = vector3(-233.0241, -921.8505, 32.55) -- The location for the marker to draw a number (this doubles as the location for the blip)
Config.UnLocation = vector3(-235.410, -921.019, 32.55) -- The location for the marker to unemploy / throw away your number-ticket
Config.JobLocation = vector3(-248.01, -913.12, 32.32) -- The location for the marker to open the suggested jobs (when not playermanaged)
Config.JobSeatLocation = vector4(-247.358246, -914.294495, 31.77, 2.834646) -- The location to sit down for the suggested jobs
Config.Radius = 9.1 -- The radius in which the text 3Dtext shows on screen
Config.Screen = {}
Config.Screen[1] = vector3(-236.426, -914.96, 34.65) -- The location of the 3Dtext on the screens (you can add as many as you like but they generate a really high resmon)
Config.Screen[2] = vector3(-248.64, -905.61, 33.59)
Config.Computer = {}
Config.Computer[1] = {location = vector3(-247.24, -912.03, 32.32), name = 'Office1', seating = vector4(-247.331863, -911.248352, 31.775293, 161.74799)} -- The location of the computers for player management
Config.Computer[2] = {location = vector3(-251.26, -924.21, 32.32), name = 'Office2', seating = vector4(-251.907684, -924.210999, 31.829712, 345.826782)}
NUI is optimized and tested on:
1280x720 | 1600x900 | 1920x1080 | 2560x1440
Resmon: 0.00ms in idle | 0.05-0.07ms when 3Dtext and markers are displayed
Comes with german and english locales, german and english SQL files, german and english html, five sounds.
You can get it at my Tebex Store
Release Notes
Version 1.0.1:
- Fixed a bug with the notification when showing the number-ticket to another player.
- Fixed some notifications that did not use the notifications.lua functions
- Fixed notifications shown twice when assigning a job via the jobcenter computer.
- Added the number-ticket inventory icon to the download
Version 1.0.0:
- Initial Release
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 2900 |
Requirements | ESX Legacy, InteractSound |
Support | Yes |
I released some other scripts here. Maybe you are interested?