Skip to content

Instantly share code, notes, and snippets.

@yupi2
yupi2 / player.lua
Last active April 15, 2018 23:44 — forked from Python1320/player.lua
By Python1320 - [GMod] individual player metatables with __index function now only a table (performance maybe)
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