ESX Society Remastered + More Options



Tebex Link


Hello everyone

I’m here to introduce you one of the biggest change in esx history !


Summary

every esx server has the esx_society script but the normal version has many problems such as missing more options and ideas, not being secured from cheaters, weak user interface and experience, and unable to track employees activity to increase efficiency of the job

so I decided to remaster esx_society into something new with fixed issues and many more options even with a good looking panel to control everything so after 30 days of hard work I made it

lets get into the all options and details about remastered version

please check the video first

boss panel

on this version instead of using ESX menu to do the stuffs we have a good looking panel that has a nice user interface to interact with and it’s also optimized and light so it wont decrease the performance also the panel is responsive and it means it’s compatible with all monitor sizes


the first part is dashboard, you can see how many online and offline your employees are, your society money, best employee of the week by activity in other words it shows who is the most active employee, new reports and new emails that we explain it on email and reports section



employees

at employee list we can see the employees list, by clicking on the employee details we can see every information about that employee such as activity, user info and some order actions such as firing the employee, paying reward and changing the job grade

example of employee activity during the week


also at the hire part you can see all the citizens there that they are online and not hired into your job yet

by clicking on hire button you can hire them


cash

there are 4 parts :

  • withdraw

  • deposit

  • wash money

  • wash money history

the last option is about to see our wash money history like when we requested to wash the money or checking the status (finished or in process yet) and also deleting the records



other options about wash money

  • you can choose which jobs can access to wash money
  • you can set limit for wash money for each day
  • you can set the time for washing money



messages

the first part on this section is job reports

have you ever wondered about a report system for employees that the boss give them some orders to do or the boss expect his employees to report the details of the day like what did they do today or these kind of stuffs, so I made a report system that employee will send the reports to the boss and boss will check them at panel


also check the video about report system


the second part of messages section is emails

emails structure is the same as job reports but emailing is for the ordinary citizens that wants to send a message to the organ like criticism or any other message so the boss will notice what do the citizens think about the organ


also check the video about report system



grades

at this part you can change the salaries for each rank



Accessibility And Permissions

in this version of ESX society you can choose which rank of which job can access to the panel and by which permissions, for example I a have coffeeshop job and this job has secretary grade, in old ESX society if the player is not boss cannot access to boss menu right ? but in this version we define that secretary grade can access to the boss panel but with limited permissions like secretary can access to only emails and messages and not the other sections on the panel

by this feature we can divide the responsibilities of the job to varies of grades so the boss is not the only one who has access to boss panel but of course boss has all permissions


permissions list

  • withdraw (society money)

  • deposit (society money)

  • wash (washing black money)

  • employees (such as employee list, edit fire, promote)

  • edit (editing employees like changing the grade)

  • reward (giving reward to an employee)

  • fire (firing employee)

  • hire (hiring employee)

  • grades (changing the salaries for each grade)

  • reports (reports list)

  • emails (emails list)


example of defining permissions in accessibility file


function getDefaultAccess()
	local defaultAccess = {
		withdraw = false,
		deposit = true,
		wash = true,
		employees = true, -- such as employee list, edit fire, promote
		edit = false,
		reward = false,
		fire = false,
		hire = true,
		grades = false,
		reports = true,
		emails = true
	}
	return defaultAccess
end

-- if you do not add your job name or grade name, no matter if you called esx_society:openBossMenu on client side and will gives an warning to player that he has no access to dashboard (dashboard wont show up)
-- also we do not need to add boss grade here, by default boss of the job access to all permissions
-- hint : remember if we set "employees" option to false for a grade, that grade will no access to employee list, reward, fire and promote actions, so you do not have to set other accesses such as "reward" and "fire" to false
Accessibility = {
	police = { -- jobname
		deputy_chief = { -- example of a grade permissions
			reward = true, -- so we want deputy to also pay rewards
			-- as you can see for each grade and rank you can set their permissions
		}, 
		accounter = { -- another grade name
			withdraw = true, -- so for example this rank has withdraw access
		},
		secretary = {
			deposit = true,
			wash = false,
			employees = false
		},
		AnotherGrade = {} -- if we want to add another rank that default permissions are enough for it then we just mention it and leave the arguments empty
		-- hint : if any rank we want to add with default permissions we need to mention it here
	}
	--[[
	another job
	ambulance = {
		doctor = { for example doctor only hires and answers reports or emails
			deposit = false,
			wash = false,
		}
	}
	]]--
}



Security

(before we get into the list I want to use “managers” word for the employees who have access to the panel)

  • by defining the permissions for grades we are no longer worried about accessibility abuses

  • managers cannot fire them self by default unless we allow them in config.lua

  • managers can only fire the employees that are below their ranks

  • managers can only give reward to the employees that are below their ranks

  • managers can only change grade the employees that are below their ranks

  • managers cannot set a higher grade than them self for an employee

  • managers cannot hire a citizen that has already a whitelisted job by default unless you change it on config.lua

  • citizens can only send one email per day to prevent spamming

  • cheaters cannot trigger any abuse or server events, even if they did it doesn’t work

  • if the grade permission is enabled there is a max salary parameter that wont let any manager to set a higher salary than the maximum

  • by default reward amount has maximum in config.lua, it prevents abuses



performance

the script is fully optimized with high performance

0.01 - 0.02 ms for non manager citizens
and 0.03 - 0.04 ms for managers that have access to boss panel

for mine was 0.01 ms when i was an ordinary citizen and 0.03 ms when I had access to panel



some other features

  • you can set the hours in order to wash money after requesting to wash

  • you can set the percentage of wage for washing money

  • you can set email and report system locations for each job at config.lua

  • you can add off duty jobs name for each whitelisted job

  • you can edit the language file at LUA and JS side to translate into another language so easily



config.lua



Config = {}

Config.Locale = 'en'
Config.EsxTriggerEvent = 'esx:getSharedObject' -- change the trigger name if you have an anti cheat that detects this trigger

local seconds = 1000
local minute = 60 * seconds
local hour = 60 * minute

-- if this is the first time you are running esx_society at server then set it true, after a few days set it false
-- this config is about adding all employees that working in whitelisted job into esx_society table when the esx_society table is empty at first
-- remember to set it false after a few days, it runes a huge queries at database
Config.InsertAllWhitelistedEmployeesAtSociety = true

-- interval timer for updating worker activity at database (how much minutes he has been working)
Config.ActivityUpdateTimer = minute * 5 -- by default every 5 minutes to update at database
Config.NoJobName = 'unemployed' -- by default is unemployed, if the name is different then change it
Config.PlayerCanFireHimSelf = false
Config.RewardHasLimit = true -- payin rewards to each employee has a limit of amount
Config.RewardLimitAmount = 1000
-----------------------------------------------------------

Config.UsingCoreMultiJobs = false -- set true if you are using core multijobs script

Config.OffDutyJobs = {
	offpolice = true,
	offambulance = true,
	offtaxi = true,
	-- you can add more offduty jobs, just make sure the value is true, for example offsheriff = true
}

Config.MoneyWashingHasLimitPerDay = true -- for example we want the job only washes blackmoney by limited times
Config.MoneyWashLimitCount = 3 -- if the MoneyWashingHasLimitPerDay is true then put the limit for example 3 means only can washmoney 3 times each day and not more

-- put the jobs that u want them to access washmoney
Config.JobsToHaveWashMoney = {
	nightclub = true,
	mafia = true,
}

Config.WashMoneyTimer = 1 * hour -- for example it takes 1 hour to wash the money, remember that the time is on your hand also must be miliseconds so set it with seconds, hour, minutes variables that are defined at the top of this file
Config.WashMoneyPercentage = 10 -- by default its 10%, it means if you put 1000 black money into washing process it gives you 900, if you want it be 100% then set 0


-- by this config we no longer need triggering esx_society:registerSociety from each job resource ! thats cool ha ? :)
Config.RegisterSocieties = {
	police = {
		name = 'police',
		label = 'Police',
		account = 'society_police',
		datastore = 'society_police',
		inventory = 'society_police',
		data = {}	
	}, -- copy and paste for other jobs and change the values
}

-- pay attention that boss by default can change the salaries for each rank, if you don't want any boss can change the salaries set it false
Config.SalaryCanBeEdited = true
-- if salary can be edited then you can configure bottom section, in order to set salary for a job you need to add the job like the examples
Config.MaxSalaryJobs = {
	police = 1000,
	ambulance = 800,
	--taxi = 500, another example
}

-- you can add post email locations for each job in order to let citizens send messages to the boss of the job about anything like how is your services quality and so on
-- if you not to want a post email for a job then do not add them at below
Config.EmailToJobs = {
	police = {
		Pos = {x = 437.75, y = -979.60, z = 29.69},
		Marker = {
			Distance = 50.0,
			Type = 1,
			Rotate = true,
			Size = {x = 1.0, y = 1.0, z = 0.5},
			Color = {r = 255, g = 255, b = 0}
		}
	},
}

-- you can add report system for each job in order to let employees send messages to their boss and reporting the details about anything about their job that they have done
-- if you not to want a report system for a job then do not add them at below
Config.ReportSystem = {
	police = {
		Pos = {x = 440.94, y = -975.75, z = 29.69},
		Marker = {
			Distance = 50.0,
			Type = 1,
			Rotate = false,
			Size = {x = 1.0, y = 1.0, z = 0.5},
			Color = {r = 255, g = 0, b = 255}
		}
	},
}

-- its optional, by configuring this you can add boss markers all in one here instead if defining them on each job resource, but anyway it's up on you

Config.UsingAllInOneBossMarkers = false

Config.BossMenuCoords = {
	police = { -- 'please insert your job name lowercase'
		MinGrade = 5, -- pay attention carefully, by configuring the accessibility.lua file you give some grades to access the boss menu right ? so check for the lowest rank that has access then put it here
		-- if you somehow by mistake put a grade that is lower than you defined at accessibility.lua they could see the marker but without access (boss menu will not show up so no worries)
		Pos = {x = 448.19, y = -973.09, z = 30.69},
		Marker = {
			Distance = 50.0,
			Type = 22,
			Rotate = true,
			Size = {x = 1.0, y = 1.0, z = 1.0},
			Color = {r = 255, g = 0, b = 255}
		}
	}, -- copy paste for the other jobs
}




License And Policy

this script is under escrow method by Fivem and also fully open source so u can edit the main files + nui files
no IP lock and no third party stuff, just copy paste the resource and run it, that’s it



Supporting Other Features

  • supporting multijobs by core
  • supporting multi character



requirements

  • es_extended or esx legacy

  • esx_identity

  • esx_addonaccount


more info

Code is accessible Yes
Subscription-based No
Lines (approximately) 5000
Requirements esx - esx_identity - esx_addonaccount
Support Yes



tebex link

you can buy the script from here



my other scripts

Realistic Fast Food
Advanced Lock System
ESX Car Bomb
ESX Books + Reading
VIP List + Test Drive
ESX Craft System
ESX Jobs List
ESX Document Robbery


update

  • this script is fully open source without any ip lock or third party license checker
  • multijobs by core supported
  • multi charachter system supported
13 Likes

woah this looks awesome!

Does this drop in as a replacement to esx_society? (IE, compatible with other scripts that require esx_society)

Does this write to the user table, when hired and fired? (IE, updates the user_rank in the user table for whitelisted jobs, that way players can get the job again after being hired, from the job center, if they switch jobs).

hi
yes it’s a replacement to esx_society
when player hired or fired it changes job column at users table

I did not understand the last part of your question

Will it work with any version of ESX?

js encoded by FiveM Escrow System?

Escrow or IP locked. I would prefer buying it if it’s escrow only…
Looks awesome though!

Well if its anything other than open source or tebex escrow than its against TOS and will get removed pretty quick i imagine. Looks awesome though

It’s not about open source. In the time of escrow, IP lock is just another limitation. We have 3 servers with same resources. A main one, a recording and a test server.

there is no such thing as ip lock via tebex escrow. so as i said previously, if any scripts you purchase use ip locking then report them. its against terms of service.

yes any version like legacy and the old version

1 Like

no sir fivem does not support Escrow for nui files yet

no worries, i can give u a special version to work on all of your servers
you can dm me for more info

actually it’s not against TOS because the js file is for nui and as long fivem does not support escrow for js or any nui files yet i believe its ok

if you think the ip lock is against tos i can remove the ip lock and just keeping license
is that ok ?

its not me you need to ask. but afaik anything like that is against TOS. definitely against tebex’s TOS.

either way i actually really like the resource, just thought i’d give you a heads up.

tnx for sharing
well i guess i need to remove the ip locking but i can keep the core js file encoded right ?

so you can’t do that

also need to tell you that i really worked hard and long for the js file so if by any chance it got leaked then i cannot do anything about that, hope u understand me but if the ip lock system is against tos i can remove that, share me your opinion