Guest User

Jo

a guest
Jan 27th, 2010
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.07 KB | None | 0 0
  1. include("alters/scoresave.lua")
  2.  
  3. ulx.setCategory( "Chat" )
  4.  
  5. function ulx.cc_pmute( ply, command, argv, args )
  6.     if #argv < 1 then
  7.         ULib.tsay( ply, ulx.LOW_ARGS, true )
  8.         return
  9.     end
  10.  
  11.     local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
  12.     if not targets then
  13.         ULib.tsay( ply, err, true )
  14.         return
  15.     end
  16.  
  17.     for _, v in ipairs( targets ) do
  18.         ulx.logUserAct( ply, v, "#A permanently muted #T" )
  19.         v.gimp = 2
  20.         SetSpecificInfo(v, "Muted", "1")
  21.     end
  22. end
  23. ulx.concommand( "pmute", ulx.cc_pmute, "<user(s)> - Permanently mutes a player.", ULib.ACCESS_ADMIN, "!pmute", _, ulx.ID_PLAYER_HELP )
  24. ulx.addToMenu( ulx.ID_MCLIENT, "Permamute", "ulx pmute" )
  25.  
  26. function ulx.cc_unpmute( ply, command, argv, args )
  27.     if #argv < 1 then
  28.         ULib.tsay( ply, ulx.LOW_ARGS, true )
  29.         return
  30.     end
  31.  
  32.     local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
  33.     if not targets then
  34.         ULib.tsay( ply, err, true )
  35.         return
  36.     end
  37.  
  38.     for _, v in ipairs( targets ) do
  39.         ulx.logUserAct( ply, v, "#A ungimped/unmuted #T" )
  40.         v.gimp = nil
  41.         SetSpecificInfo(v, "Muted", "0")
  42.     end
  43. end
  44. ulx.concommand( "ungimp", ulx.cc_unpmute, "<user(s)> - Ungimps a player.", ULib.ACCESS_ADMIN, "!ungimp", _, ulx.ID_PLAYER_HELP )
  45. ulx.concommand( "unmute", ulx.cc_unpmute, "<user(s)> - Unmutes a player.", ULib.ACCESS_ADMIN, "!unmute", _, ulx.ID_PLAYER_HELP )
  46. ulx.concommand( "unpmute", ulx.cc_unpmute, "<user(s)> - Removes a permamute status and unmutes a player.", ULib.ACCESS_ADMIN, "!unpmute", _, ulx.ID_PLAYER_HELP )
  47. ulx.addToMenu( ulx.ID_MCLIENT, "Unpmute", "ulx unpmute" )
  48.  
  49. function ulx.cc_pgag( ply, command, argv, args )
  50.     if #argv < 1 then
  51.         ULib.tsay( ply, ulx.LOW_ARGS, true )
  52.         return
  53.     end
  54.  
  55.     local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
  56.     if not targets then
  57.         ULib.tsay( ply, err, true )
  58.         return
  59.     end
  60.  
  61.     for _, v in ipairs( targets ) do
  62.         ulx.logUserAct( ply, v, "#A permanently gagged #T")
  63.         umsg.Start( "ulx_gag", v )
  64.             umsg.Bool( true )
  65.         umsg.End()
  66.         SetSpecificInfo(v, "Gagged", "1")
  67.     end
  68. end
  69. ulx.concommand( "pgag", ulx.cc_pgag, "<user(s)> - permanently gags user(s) (Disable voice/mic input).", ULib.ACCESS_ADMIN, "!pgag", _, ulx.ID_PLAYER_HELP )
  70. ulx.addToMenu( ulx.ID_MCLIENT, "Permagag", "ulx pgag" )
  71.  
  72. function ulx.cc_unpgag( ply, command, argv, args )
  73.     if #argv < 1 then
  74.         ULib.tsay( ply, ulx.LOW_ARGS, true )
  75.         return
  76.     end
  77.  
  78.     local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords
  79.     if not targets then
  80.         ULib.tsay( ply, err, true )
  81.         return
  82.     end
  83.  
  84.     for _, v in ipairs( targets ) do
  85.         ulx.logUserAct( ply, v, "#A ungagged #T" )
  86.         umsg.Start( "ulx_gag", v )
  87.             umsg.Bool( false )
  88.         umsg.End()
  89.         SetSpecificInfo(v, "Gagged", "0")
  90.     end
  91. end
  92. ulx.concommand( "ungag", ulx.cc_unpgag, "<user(s)> - Ungags user(s).", ULib.ACCESS_ADMIN, "!ungag", _, ulx.ID_PLAYER_HELP )
  93. ulx.concommand( "unpgag", ulx.cc_unpgag, "<user(s)> - Removes a permagag status and unmutes a player.", ULib.ACCESS_ADMIN, "!unpgag", _, ulx.ID_PLAYER_HELP )
  94. ulx.addToMenu( ulx.ID_MCLIENT, "Unpgag", "ulx unpgag" )
  95.  
Advertisement
Add Comment
Please, Sign In to add comment