From 5094bba5e997949067ff5bade47edb05d9c4bcd0 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sun, 5 Sep 2004 22:09:45 +0000 Subject: [PATCH] added MNF_GetPlayerEdict --- amxmodx/modules.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 442940f9..512befd8 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -864,6 +864,13 @@ void MNF_MergeDefinitionFile(const char *file) g_langMngr.MergeDefinitionFile(file); } +edict_t* MNF_GetPlayerEdict(int id) +{ + if (id < 1 || id > gpGlobals->maxClients) + return NULL; + return (GET_PLAYER_POINTER_I(id)->pEdict); +} + // Fnptr Request function for the new interface const char *g_LastRequestedFunc = NULL; #define REGISTER_FUNC(name, func) { name, (void*)func }, @@ -938,6 +945,7 @@ void *Module_ReqFnptr(const char *funcName) REGISTER_FUNC("IsPlayerHLTV", MNF_IsPlayerHLTV) REGISTER_FUNC("GetPlayerArmor", MNF_GetPlayerArmor) REGISTER_FUNC("GetPlayerHealth", MNF_GetPlayerHealth) + REGISTER_FUNC("GetPlayerEdict", MNF_GetPlayerEdict) REGISTER_FUNC("CellToReal", MNF_CellToReal) REGISTER_FUNC("RealToCell", MNF_RealToCell)