Quote:
Originally Posted by killerZM
u r smart but what is g_pengfuncTable ?
|
enginefuncs_t *g_pengfuncsTable this is engine function hooker. you can hook with this engine functions. this is created in amxmodule.cpp/meta_api.cpp. and you can use this with extern:
Code:
extern enginefuncs_t *g_pengfuncsTable;
better hook functions earlier at starting server. theres also g_pengfuncsTable_Post variable, which hooks same functions but after this function is called (Post).
example of hooking PrecacheModel
Code:
int OnPrecacheModel_Post(const char *Resource)
{
<Your Code Here>
<Wanna Block Precache?, then use RETURN_META_VALUE(MRES_SUPERCEDE, NULL);>
// ^^ Not tested but think must work
}
void <Function where you want to set hook for engine functions>(void)
{
g_pengfuncsTable_Post->pfnPrecacheModel = OnPrecacheModel_Post;
}