#pragma once // used: callvfunc #include "..\..\utils\memory\vfunc\vfunc.h" #include class IEngineClient { public: int maxClients() { return M::vfunc(this); } bool in_game() { return M::vfunc(this); } bool connected() { return M::vfunc(this); } int get_local_player() { int nIndex = -1; M::vfunc(this, std::ref(nIndex), 0); return nIndex + 1; } public: inline bool valid() { return connected() && in_game(); } };