Is there a way to get if the player is an admin from the entity?
1 replies, posted
I'm currently doing a little bit of editing of Mad Cows Base for a friend, and essentially all he wants me to do is make it so that rpgs, and grenades and such only de-weld things if your an admin. I found the code that does the de-welding in all in the ents_mad_rpg, but for the life of me i cannot figure out how to get my code:
[LUA]
if self.Owner:IsAdmin() then
for k, v in pairs(en) do
if (v:GetPhysicsObject():IsValid()) then
// Unweld and unfreeze props
if (math.random(1, 100) < 10) then
v:Fire("enablemotion", "", 0)
constraint.RemoveAll(v)
end
end
end
[/LUA]
to work. I've tried ply, and localplayer so far, any ideas?
Is the entities Owner set as the player who shot it with the SWEP?
Sorry, you need to Log In to post a reply to this thread.