not sure where these kind of requests go or if they are even accepted.
so, i wanted to setup immunity to props, using tables, so if your rank matched the table and you were trying to pickup a prop from another usergroup detected by a table then it would not allow you to pick it up, problem is that it wont work at all
i hardly know any lua so please tell me if this is all wrong, dont just lay down an entire answer for me, i came to the forums to learn not for people to do my work, if its all wrong pls tell me what im doing thats incorrect.
--This is where your immunity is.
--Example: immunity1 cannot interact with immunity2 and up.
local immunity0 = {"user"}
local immunity1 = {"moderator"}
local immunity2 = {"admin"}
local immunity3 = {"Developer"}
local immunity4 = {"superadmin"}
local immunity5 = {"owner"}
--DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW HOW LUA WORKS!!!
function PlayerPickedUpProp( ply, ent )
if ( ply:IsUserGroup(immunity3) and ent:GetOwner():IsUserGroup(immunity2) ) then
return false end
end
hook.Add( "PhysgunPickup", "PlayerPickedUpProp", PlayerPickedUpProp )
thanks!!!
if it helps, these groups are from ulx hence the reason its IsUserGroup