MiniPickels

ulx administrate Script

Mar 6th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. function ulx.administrate( calling_ply, should_revoke )
  2.  
  3. if not should_revoke then
  4. calling_ply:GodEnable()
  5. else
  6. calling_ply:GodDisable()
  7. end
  8.  
  9. if not should_revoke then
  10. ULib.invisible( calling_ply, true, 0 )
  11. else
  12. ULib.invisible( calling_ply, false, 0 )
  13. end
  14.  
  15. if not should_revoke then
  16. calling_ply:SetMoveType( MOVETYPE_NOCLIP )
  17. else
  18. calling_ply:SetMoveType( MOVETYPE_WALK )
  19. end
  20.  
  21. if not should_revoke then
  22. ulx.fancyLogAdmin( calling_ply, true, "#A is now administrating" )
  23. else
  24. ulx.fancyLogAdmin( calling_ply, true, "#A has stopped administrating" )
  25. end
  26.  
  27. end
  28. local administrate = ulx.command( "Utility", "ulx administrate", ulx.administrate, { "!admin", "!administrate"}, true )
  29. administrate:addParam{ type=ULib.cmds.BoolArg, invisible=true }
  30. administrate:defaultAccess( ULib.ACCESS_SUPERADMIN )
  31. administrate:help( "Cloak yourself, noclip yourself, and god yourself." )
  32. administrate:setOpposite( "ulx unadministrate", { _, true }, "!unadministrate", true )
Add Comment
Please, Sign In to add comment