- mysql-async
- es_extended (Tested on v1 Final)
Unlike the classic duty system that sets a new job, this system works with a simple variable that is saved in the database.
Very easy to configure, and usable for any job
The script has been created in order to create the least amount of lag both client and server side
--config.lua :
Position = {
{ job = "polizia", grademin = 0, x = 441.06674194336, y = -978.576171875, z = 30.689609527588}
}
--put on job the job that the marker can see, in grademin the minimum grade of the job that the marker can see and in x, y, z, the marker position
-- Request Code if ExampleChekJobInDutyOnline("police") > 1 then --As argument put the job to check --in this case the "ExampleChekJobInDutyOnline" function gives you the number of "police" online and in service, useful for carrying out checks for robberies or for paycheck end
-- Function
ExampleChekJobInDutyOnline = function (job)
local count = 0
for index, player in pairs(GetPlayers()) do
if tonumber(player) ~= nil then
local xPlayer = ESX.GetPlayerFromId(tonumber(player))
local inDuty = exports["mxm_duty"]:getDuty(tonumber(player))
if xPlayer then
if xPlayer.job.name == job and inDuty then
count = count + 1
end
end
end
end
return count
end
local inDuty = exports["mxm_duty"]:getClienDuty()
if inDuty then
--print("in Duty")
else
--print("Off Duty")
end
The publication of the script does not authorize its commercialization. if you have any advice or want to propose changes you can contact us via discord
"Main Developer:" MaXxaM#0511
"Powered By" fenixhub.dev