Physgunning with Jobs

Hello FP.
I want to have the following, but im not sure how to get this

  1. I want players under the ULX group donoradmin to only be able to physgun other player’s props while they are on the ‘Admin on Duty’ job
  2. This is the same for removing props while on the rank.
  3. They still need to be able to use their physgun while not admin on duty, but cannot physgun other players props props.

How can I achieve this?

ply:Team() == (whatever the admin on duty index is)

This should work:
[lua]
function SimpleJobPickupRestriction( ply, ent )
local jobs = {TEAM_ADMIN} – Replace here with the Admin on Duty jobs’ index
if ply:CheckGroup(“donoradmin”) then
if ent:GetOwner() ~= ply then
if table.HasValue(jobs,ply:Team()) then
return true
end
end
end
end
hook.Add( “PhysgunPickup”, “SimpleJobPickupRestriction”, SimpleJobPickupRestriction )
[/lua]