RaphaelIT7 / gmod-holylib

A library that contains some functions and optimizations for gmod.
46 stars 4 forks source link

Turn HLTVClient from userdata to table #17

Closed Glebux closed 6 days ago

Glebux commented 2 weeks ago

Since HLTVClient is userdata, it's impossible to attach data to a client instance and add custom functions. Instead, store all functions in a metatable, accessible through FindMetaTable, and initiate clients as lua tables with that metatable attached

RaphaelIT7 commented 6 days ago

So I added HLTVClient:GetTable() which seems to work now and should allow you to attach data and add custom functions.