could someone help me with this,
i'm trying to figure out how to make this not target staff above moderators, any help will be appreciated
[code]local function PlayerPickup( ply, ent )
if (ply:IsUserGroup("moderator") and ply:Team() == TEAM_MODERATOR) && ent:GetClass() == "player" then
ent:SetMoveType(MOVETYPE_NONE)
ent:Freeze(true)
return true
end
end
hook.Add( "PhysgunPickup", "NoPhhysgunPickupDuty", PlayerPickup )[/code]
Wait, so just checking, you're trying to stop admins from picking up players, right? Or the other way round?
What's with your inconsistent use of "and" and "&&"?
[code]
local ranks = {
"admin",
"superadmin",
}
local function PlayerPickup( ply, ent )
if (ply:IsUserGroup("moderator") and ply:Team() == TEAM_MODERATOR) && ent:GetClass() == "player" then
if (table.HasValue(ranks, ent:GetUsergroup()) then return false end
ent:SetMoveType(MOVETYPE_NONE)
ent:Freeze(true)
return true
end
end
hook.Add( "PhysgunPickup", "NoPhhysgunPickupDuty", PlayerPickup )[/code]
Sorry, you need to Log In to post a reply to this thread.