Closed Senlar closed 2 years ago
You can do this yourself, but do it outside of the script
setupTargets = function()
if ESX.GetPlayerData().job.name == job then
exports["fivem-target"]
end
end
Only the top level access, which I'm doing now. But MF asked for people to make reports for features so that's what I'm doing.
nah yeha thats fair enough
The only way any "character data" restrictions will be applied are through state bags, if ever. That won't work by default for ESX jobs so this is likely something you will need to handle yourself when adding/removing targets.
Reason is of course, no framework requirements.
Add option for job and rank restriction on the main interaction and options. Allow jobs to be sent as key value pairs with the value being the minimum rank to interact. {ambulance = 0, police = 3}
Example: Below is a use case where there is one interaction created that has an overall restriction to only allow police or ambulance to see the interaction. Then, each interaction has further limitations.
Hands up can only be done by police, then rank matches the access rank so there are no further rank restrictions. Open Inventory can only be done by police, but it HAS a restriction on the higher rank so only rank 3 and up can do it. Ragdoll can only be done by ambulance job. High Five can be done by any police or ambulance since it is restricted to just those two jobs at the top level.
If we didn't include the top level restriction, then the job restrictions would still apply on each option, but High Five could be done by anyone.