Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ************************************
- // IsDormant
- // Taken from Hermes
- // Thanks fr1kin you big fucking faggot
- // ************************************
- LUA_FUNCTION( IsDormant )
- {
- cerberus::Lua->CheckType( 1, GLua::TYPE_NUMBER );
- int index = cerberus::Lua->GetNumber( 1 );
- IClientEntity* pClientEntity = g_pClientEntList->GetClientEntity( index );
- if ( pClientEntity )
- {
- cerberus::Lua->Push( pClientEntity->IsDormant() );
- return 1;
- }
- else
- {
- return 0;
- }
- }
- int cerberus::open(lua_State *L) {
- cerberus::Lua = Lua();
- CreateInterfaceFn client = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("client.dll"), "CreateInterface");
- g_pClientEntList = (IClientEntityList*)client("VClientEntityList003", 0);
- if(g_pClientEntList != NULL) {
- cerberus::Lua->NewGlobalTable("vmt");
- ILuaObject *glob_table = cerberus::Lua->GetGlobal("vmt");
- if(glob_table != NULL) {
- glob_table->SetMember("IsDormant", IsDormant);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement