IsDormant

Posts 1–12 of 12 · Page 1 of 1
IsDormant
I made a isdormant module a while ago, here is some code for you guys to have. I have placed two anti skids in this. It will crash you if you don't fix it.

Code:
#define GMMODULE

#include <Windows.h>
#include <cdll_int.h>
#include <Lua/Interface.h>
#include <icliententitylist.h>
#include <cbase.h>

int IsDormant_L(lua_State* state)
{
	GarrysMod::Lua::UserData* pudPlayer = (GarrysMod::Lua::UserData*)LUA->GetUserdata(1);
	static CreateInterfaceFn ClientFactory = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("client.dll"), "CreateInterface");
	static IClientEntityList* pEntityList = (IClientEntityList*)ClientFactory(VCLIENTENTITYLIST_INTERFACE_VERSION, 0);
	C_BaseEntity* pPlayer = pEntityList->GetClientEntity((int)pudPlayer->data)->GetBaseEntity(); //hint, one is on this line
	if(!pPlayer)
	{
		LUA->PushBool(true);
	}
	LUA->PushBool(pPlayer->IsDormant());

	return 1;
};

GMOD_MODULE_OPEN()
{
	LUA->PushSpecial( GarrysMod::Lua::SPECIAL_GLOB );
	LUA->PushCFunction(IsDormant_L);
	LUA->SetField(-2, "IsDormant");
	LUA->Pop();

	return 0;
};

GMOD_MODULE_CLOSE()
{
	return 0;
};
Quote Originally Posted by TheMikuChibi View Post
What do it does ?
it do does respond with if the player is not in their pvs
Quote Originally Posted by BigBadHackGuy View Post
absolute trash
just like fking hayden
I think you didnt get the joke.
Quote Originally Posted by hagwart2 View Post
I think you didnt get the joke.
what is joke????????????????????? pls explain
So what exactly does this do Meep?
Quote Originally Posted by BigBadWilly View Post
So what exactly does this do Meep?
Quote Originally Posted by MeepDarknessMeep View Post
it do does respond with if the player is not in their pvs
aaaaaaaaaaaaaa tooshort
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us