Job access
Closed this issue · 2 comments
ivegotthis commented
Hi, firstly, this is great, been looking for something like this for ages. I did have an idea, I don't think the option is there but it would be great if you could add Job only access too.
Thanks.
goodluckgod commented
Hello, thanks for advice but actually he have this feature! You can check code from bellow.
function CheckOption(data, entity)
data.distance = data.distance or Config.DefaultDistance
if entity.distance and data.distance and entity.distance > data.distance then return false end
if data.job and not JobCheck(data.job) then return false end
if data.excludejob and JobCheck(data.excludejob) then return false end
if data.jobType and not JobTypeCheck(data.jobType) then return false end
if data.excludejobType and JobTypeCheck(data.excludejobType) then return false end
if data.gang and not GangCheck(data.gang) then return false end
if data.excludegang and GangCheck(data.excludegang) then return false end
if data.item and not ItemCheck(data.item) then return false end
if data.citizenid and not CitizenCheck(data.citizenid) then return false end
if data.canInteract and not data.canInteract(entity.target, distance, data) then return false end
return true
end
ivegotthis commented
FFS, sorry, i see that now. This is great btw. I've actually removed the Radialmenu in favour of this.