Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local PLUGIN = {}
  2.  
  3. PLUGIN.Name = "Admin Pickup Players"
  4. PLUGIN.Author = "RedMist"
  5. PLUGIN.Date = "15th March 2011"
  6. PLUGIN.Filename = PLUGIN_FILENAME
  7. PLUGIN.ClientSide = true
  8. PLUGIN.ServerSide = true
  9. PLUGIN.APIVersion = 2
  10. PLUGIN.Gamemodes = {}
  11.  
  12. if (SERVER) then
  13.  
  14. function PLUGIN.PhysgunPickup( PLAYER, ENTITY )
  15. if PLAYER:IsAdmin() then
  16. if ENTITY:IsPlayer() then
  17. if ENTITY != PLAYER then
  18. if ENTITY:IsBetterOrSame(PLAYER) then
  19. return false
  20. end
  21. end
  22. ENTITY:Freeze(true)
  23. ENTITY:SetMoveType(MOVETYPE_NOCLIP)
  24. return true
  25. end
  26. end
  27. end
  28. hook.Add( "PhysgunPickup", "PhysgunPickup", PLUGIN.PhysgunPickup )
  29.  
  30. function PLUGIN.PhysgunDrop(PLAYER, ENTITY)
  31. if ENTITY:IsPlayer() then
  32. ENTITY:SetMoveType(MOVETYPE_WALK)
  33. ENTITY:Freeze(false)
  34. end
  35. end
  36. hook.Add( "PhysgunDrop", "PhysgunDrop", PLUGIN.PhysgunDrop)
  37.  
  38. end
  39.  
  40. if (CLIENT) then
  41. end
  42.  
  43. ASS_RegisterPlugin(PLUGIN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement