Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. function PropFunc1(ply,ent)
  2.    
  3.     ent:SetColor(Color(ent:GetColor().r,ent:GetColor().g,ent:GetColor().b,150))
  4.    
  5.     ent:GetPhysicsObject():EnableCollisions(false)
  6.    
  7.     if ent:IsPlayer() then return false end
  8.  
  9.     if ent:GetNetworkedString("Owner") != ply:Nick() then return false end
  10.    
  11.     return true
  12.    
  13. end
  14.  
  15. function PropFunc2(ply,ent)
  16.    
  17.     ent:SetColor(Color(ent:GetColor().r,ent:GetColor().g,ent:GetColor().b,255))
  18.    
  19.     ent:GetPhysicsObject():EnableCollisions(true)
  20.    
  21.     if ent:IsPlayer() then return false end
  22.    
  23.     if ent:GetNetworkedString("Owner") != ply:Nick() then return false end
  24.    
  25.     return true
  26.    
  27. end
  28.  
  29. hook.Add("PhysgunPickup","PropFunction1",PropFunc1)
  30.  
  31. hook.Add("PhysgunDrop","PropFunction2",PropFunc2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement