This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local entity = FindMetaTable( "Entity" ) | |
local meta = FindMetaTable( "Player" ) | |
local panel = CLIENT and FindMetaTable( "Panel" ) | |
local GetEngineTable = entity.GetTable | |
local pltostring = FindMetaTable"Player".__tostring | |
local R=debug.getregistry() | |
local lowest = math.huge | |
local setted = meta | |
local function SetPlyMeta(t) if R[lowest]~=setted then ErrorNoHalt("1WOO".. (R[lowest]==panel and "<A>" or '<B>') .."OT\n") end setted = t R[lowest]=t end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Status: Almost working. Fork and help make it better! | |
-- Objective: | |
-- Slow down the "instant" stops considerably | |
-- when trying to go opposite direction | |
-- of current movement while airmoving | |
-- and do not break airmoving too much | |
-- Setup: sv_airaccelerate 1000 | |
-- required inputs: | |
-- sv_airaccelerate, GetVelocity, | |
-- GetViewAngles.yaw, GetForwardMove, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubit=ubit or {} | |
local bit=bit | |
local ubit=ubit | |
function gen(name) | |
local f=bit[name] | |
if not f then error"?!?" end | |
local function func(...) | |
local ret = f(...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
H=NewChain( | |
function(chain,...) | |
if not chain[2] then | |
return hook.Run(chain[1],...) -- call hook | |
elseif chain[2] then | |
return hook.GetTable()[chain[1]][chain[2]](...) -- call single hook?? | |
end | |
end, | |
function(chain,val) | |
if isfunction(val) then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://www.sqlite.org/lang_corefunc.html#last_insert_rowid | |
function sql.LastRowID() | |
local ret = sql.Query("SELECT last_insert_rowid() as x")[1].x | |
return ret | |
end | |
-- http://www.tutorialspoint.com/sqlite/sqlite_date_time.htm | |
local escape=sql.SQLStr | |
local function gen_datefunc(fname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local luadata = {} | |
local encode_table | |
local typex=type | |
function table.isarray(t) | |
local i = 0 | |
for _ in pairs(t) do | |
i = i + 1 | |
if t[i] == nil then return false end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local strchar=string.char | |
local strfind=string.find | |
local gsub=string.gsub | |
local strsub=string.sub | |
local strlen=string.len | |
local tinsert=table.insert | |
local strlower=string.lower | |
local tremove=table.remove | |
local format=string.format | |
local getn=function(x) return #x end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--do return print(util.SteamIDTo64("STEAM_0:1:1")) end | |
local fSid=file.Open("hac_sids.dat",'rb','DATA') | |
local fReasons=file.Read("hac_reason.dat",'DATA') | |
local reasons = {} | |
local lastpos=1 | |
require'vstruct' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import sys | |
import re | |
parse_steamid = re.compile(r"^STEAM_(?P<X>\d+):(?P<Y>\d+):(?P<Z>\d+)$") | |
import struct | |
json_data=open("hac_db_all.json").read() |