Tutorials
These tutorials will walk you through all the options available.
Last updated
Was this helpful?
These tutorials will walk you through all the options available.
Last updated
Was this helpful?
Organization is not a job, so if you want use it with doorlock (for example ox_doorlock) you need to make some modifications.
Navigate to server/framework/es_extended.lua
modify IsPlayerInGroup
function on line 41, to look like this:
function IsPlayerInGroup(player, filter)
local type = type(filter)
if type == 'string' then
if player.job.name == filter then
return player.job.name, player.job.grade
end
if player.get("org").name == filter then
return player.get("org").name, 0
end
else
local tabletype = table.type(filter)
if tabletype == 'hash' then
local grade = filter[player.job.name]
if grade and grade <= player.job.grade then
return player.job.name, player.job.grade
end
if filter[player.get("org").name] and true and 0 <= 0 then
return player.get("org").name, 0
end
elseif tabletype == 'array' then
for i = 1, #filter do
if player.job.name == filter[i] then
return player.job.name, player.job.grade
end
if player.get("org").name == filter[i] then
return player.get("org").name, 0
end
end
end
end
end
Add the doorlock as you normally would for a job which in this case will be organization name. Script will now recognize organizations as jobs, but they will remain independent anywhere else.
You can use /setorg [id] [org_name]
to add player to organization. Adding player this way will grant them all permissions, so it's recommended only for the leader. Leader can hire new members through tablet.
If you want to remove a player from an organization use /setorg [id] unemployed
Members can also be removed through tablet with the fire option.
Being (or not) in an organization does not affect player's job