[ESX] Advanced Job System V1.1.0

ESX Advanced Job System [AJS]

Create/Modify ANY job you want for your server with a huge amount of configs (and even more to come!)

All the Information:

  • General :

    • onesync and onesync infinite ready!
    • A lot of security checks and fail safes
    • Automatic SQL system
    • Discord log system
    • Custom language system (easy to use)
    • GTA style notification and Chat style notification (configurable)
    • Automatically remove money from player bank if they don’t have enough cash
    • Support for all ESX versions
    • You can use this along side of other scripts for whichever function(s) you want
      (For example, use automatic ranking system for your Taxi job!)
      (Or inventory for your Ambulance job)
      (Or garage for Police job)
      (Or …)
      Possibilities are endless!
  • Auto Database Configure for Jobs/Grades :

    • You don’t need to edit anything manually, or import anything anymore!
      everything will be sync between database and config completely Automatic!
      (grades, salary, label, job name)
    • Unlimited amount of jobs/grades can be added and edited with ease!
  • Auto Ranking system :

    • Players can be ranked up/down automatically!
      (when they reach the needed XP)
    • exports available to remove/add/get/give XP to players from any script you want
    • XP will be saved even if player change the job
    • Players can have multiple job XP data
    • Custom amount of XP for each rank
    • Can exclude boss rank from auto ranking
    • You can set XP boost for players with different grades!
      (for ex. more XP for higher ranks!)
  • Crafting system :

    • Infinite amount of craftable items
    • you can add as much ingredients as you want for crafting anything
    • You can set the amount of ingredient it needed for each item
    • you can also add more than 1 item for players to receive when crafting is done
    • Can limit inventory access to player with job uniform on only!
    • You can set craftXP for player to get XP with each craft
      (useful for auto ranking)
    • Marker and blip settings
  • Changing room :

    • Can have one shared uniform
    • And one uniform for every rank
    • Marker and blip settings
      (nothing so special here, YET)
  • Inventory system :

    • Completely custom inventory system with lowest SQL usage possible! (optimization)
    • No import or manually SQL edit needed, everything is automated!
    • Unlimited amount of inventories for any job
    • Can limit inventory access to grades!
    • Can limit inventory access to player with job uniform on only!
    • Marker and blip settings
  • Garage system :

    • You can have infinite amount of garages for every job
    • Every garage can have their own set of spawnable vehicles and spawn points
    • Can limit garage access to grades!
    • You can see your car in map/mini map
    • There is export available to check for vehicle ownership
      (useful for car lock scripts)
    • Infinite amount of spawn points with a lot of fail safe
    • Completely server-sided spawn/despawn for vehicles!
    • Works on onesync and onesync infinite
    • Configurable caution for getting vehicle from garage
    • Max amount of available vehicle to spawn for every job
    • Can limit garage access to player with job uniform on only!
    • Marker and blip settings
  • Central Shop

    • you can add item for buy/sell to a specific job
    • or you can just enable it for everybody to be able to buy/sell that item
    • you can have infinite amount of items on config
    • shop will eventually run out of stock, players or admins can sell items to shop, to restock it
      (will be saved on database and wont reset (more options coming soon))
    • Marker and blip settings

if you already read all the configs but still want to see it in action, here is a very fast overview of the script : Video

Script files:
structure

Click to see config file screenshots (there is alot...)


Performance (Script usage, AKA, resmon)

This is how it perform on my pc
(i3 9100F / GTX 970 / GTA and Fivem both on SDD)

idle (nothing nearby | w/o job): 0.01 ms
idle (nothing nearby | w/ job): 0.01 ms

near central shop marker (w/o job) 0.03 ms
near central shop marker (w/ job) 0.03 ms

near all the markers (9 in total) at once (w/ job | 5 inventory marker, 1 car marker, 1 crafting marker, 1 clothing marker, 1 central shop) : 0.07 ms

near all the markers (as above) + notification : 0.09 ms

near all the markers (as above) + in menu : 0.08 ms (yes it take less when you are in menu, because it will no longer show the notification)

IMPORTANT NOTES (MUST READ)

This script will change jobs / job_grades and users tables a lot!
Make sure to backup your jobs and job_grades and users tables before messing around with this script
again, please BACKUP before doing anything

If you add any job in the config, you can no longer edit them from database manually, and you need to change the config , and it will be automatically synced
(that is the main point of this script to make everything more user friendly and easy to use!)

if you have autoranking enable :

  • all the players (with that same job) will be set to rank 0 (rank is also known as grade)
  • You can no longer manually set somebody to a grade you want
  • You have to give players the XP they need for any rank, and they will automatically be promoted to the rank for the amount of XP they have

Jobs/grades will be automatically modified/added to your database
but items (for crafting or central shop) need to be added manually

If you have any cool idea for the updates , let me know i will try to add them as soon as i can!

This script is not compiled or obfuscated , as i respect anybody that buy my script
but please, do not resell, rename, modify and sell, or share this script
This took me a lot of time to code, please respect my time and work :heart:

Dependencies :

  • Global :

    • onesync (infinite works too!)
    • ESX ( any version should work )
    • esx_menu_default (you probably already have this)
    • esx_menu_dialog (you probably already have this)
    • mysql-async (v3.3.2 or higher)
  • Uniform menu :

    • esx_skin
    • skinchanger
  • Crafting menu :

    • mythic_progbar

You can buy the script from my tebex store : Exacute Tebex Store

My other scripts :
ESX Advanced Needs
ESX Second Hand Vehicle
ESX Adminplus
Advanced Kit System

Hope you enjoy :snail:

7 Likes

Don’t get me wrong, this is really great. But how do you expect for people to buy this when you admit you are too lazy to take a proper screenshot / video.

hello
thank you for your reply
tbh, i didn’t know what to screenshot and also was going to make a video, but i thought the config file screenshots will do the trick.
but you are completely right
i will upload some screenshots tomorrow ASAP

What’s the ms on this?

quick question. how do the items that are made with a visual inventory system, Im guessing you can basically preload the inventory resources with pictures/icons/thumbnails of a items and when you make the item that matches the thumbnails name it will have a picture associated with it. in other words if you make a item called nailbag, then have a picture in the inventory called nailbag it should start showing um, Thats if when a item through the job system shows up in the Items section of the database… also 2ND question, can you make a item that gives a effect when used, Like if you make a restaurant and someone makes a hamburger , cant that be used to decrease hunger, to if you use it for a drug job can you add armor/health? Well shoot I thought this was going to be a quick question, now there is 2 questions , thanks again for the hard work, oops 3rd question has this been tested with es_extended 1.1 the “limit” system?

are you talking about like esx_inventoryhud? - if you want to use that inventory interface on a client machine, you need to have any open inventory functionality in other resources trigger the network event for that opens the inventory hud. for esx_inventoryhud, it’s all documented on their wiki: Job (society) storages · Trsak/esx_inventoryhud Wiki · GitHub

to have images related to items, you’ll need to put .pngs or .jpegs in the proper folder within the inventory resource and name it the same as the item name column in the database.

to make any item work with ESX, you need to register it as a usable item and define the functionlity in the callback. the pattern is this:

ESX.RegisterUsableItem('itemname', function(source)  
      -- anything in this callback function gets executed when player uses the item
      -- have whatever functionality you want here!

      -- do this to remove it from their inventory
    local xPlayer = ESX.GetPlayerFromId(source)
    xPlayer.removeInventoryItem('itemname', 1)
end)

i know i’m not the OP but hopefully that helps! :smiley:

1 Like

I guess i was wondering if the items were real, like after a new job item is created does it add it to the items section of the database. if it adds a real item like that should be no trouble finding a picture for the inventoryhud and working that file name into its resource/config gile.

some scripts, esx_druglabs comes to mind where as you work through the steps there are no real items until the final product.

thanks for the reply , my mind crapped out on me and forgot what the inventoryhuds were called lol

This is how it perform on my pc
(i3 9100F / GTX 970 / gta and fivem on ssd)

idle (nothing nearby | w/o job): 0.01 ms
idle (nothing nearby | w/ job): 0.01 ms

near central shop marker (w/o job) 0.03 ms
near central shop marker (w/ job) 0.03 ms

near all the markers (9 in total) at once (w/ job | 5 inventory marker, 1 car marker, 1 crafting marker, 1 clothing marker, 1 central marker) : 0.07 ms

near all the markers (as above) + notification : 0.09 ms

near all the markers (as above) + in menu : 0.08 ms (yes it take less when you are in menu, because it will no longer show the notification)

Hello

  1. this script does not support visual inventory (AKA inventory hud) by default
    but yes, you have to match the icons name to the database name (but dont forget to also add new items in fxmanifest.lua (or __resource.lua) files

  2. for creating any item to do something as you said, like decrease hunger , you have to do what bun9000 said (thank you bun!)

  3. and yes, it will work with ESX 1.1 and 1.2

no , it will not automatically add items to your database (at least yet)
so you have to manually add items (but everything else is automated)

i apologize if i misunderstand something…

1 Like

perfect and dead on. thanks to everyone for the help!

1 Like

Post Update

  • Added a short video for overview of some of function in action
  • Added script performance data

(the video is not a complete overview at all. it would have been over 10 minutes if i did a complete overview , i still highly recommend to read the informations and config screenshots on the post …)

Small Update V1.0.1 :

  • Fix : small mistake on translation.lua

(no bug reported yet! this is awesome !)

1 Like

New Update V1.1.0 :

  • Fix : Error on no player job
  • Fix : A few translation problems
  • A little script cleanup
  • NOTE : Config is unchanged, so you dont need to reconfig, just use your old config with new update!