void OnAmxxAttach() { initialze_offsets(); initialize_glb_offsets(); MF_AddNatives(engfunc_natives); MF_AddNatives(dllfunc_natives); MF_AddNatives(pev_natives); MF_AddNatives(forward_natives); MF_AddNatives(pdata_natives); MF_AddNatives(tr_Natives); MF_AddNatives(glb_natives); MF_AddNatives(ext2_natives); MF_AddNatives(misc_natives); g_kvd_glb.kvd.szClassName = const_cast<char *>(g_kvd_glb.cls.chars()); g_kvd_glb.kvd.szKeyName = const_cast<char *>(g_kvd_glb.key.chars()); g_kvd_glb.kvd.szValue = const_cast<char *>(g_kvd_glb.val.chars()); g_kvd_glb.kvd.fHandled = 0; ConfigManager = MF_GetConfigManager(); char error[256]; error[0] = '\0'; if (!ConfigManager->LoadGameConfigFile("common.games", &CommonConfig, error, sizeof(error)) && error[0] != '\0') { MF_Log("Could not read common.games gamedata: %s", error); MF_Log("get/set/find_ent_data* natives have been disabled"); return; } MF_AddNatives(pdata_gc_natives); }
void OnAmxxAttach() { initialze_offsets(); initialize_glb_offsets(); MF_AddNatives(engfunc_natives); MF_AddNatives(dllfunc_natives); MF_AddNatives(pev_natives); MF_AddNatives(forward_natives); MF_AddNatives(pdata_natives); MF_AddNatives(tr_Natives); MF_AddNatives(glb_natives); MF_AddNatives(ext2_natives); MF_AddNatives(misc_natives); MF_AddNatives(pdata_entities_natives); MF_AddNatives(pdata_gamerules_natives); g_kvd_glb.kvd.szClassName = const_cast<char *>(g_kvd_glb.cls.chars()); g_kvd_glb.kvd.szKeyName = const_cast<char *>(g_kvd_glb.key.chars()); g_kvd_glb.kvd.szValue = const_cast<char *>(g_kvd_glb.val.chars()); g_kvd_glb.kvd.fHandled = 0; ConfigManager = MF_GetConfigManager(); char error[256] = ""; if (!ConfigManager->LoadGameConfigFile("common.games", &CommonConfig, error, sizeof(error)) && error[0] != '\0') { MF_Log("get/set_ent_data* natives have been disabled because common.games gamedata could not be read: %s", error); return; } *error = '\0'; if (!ConfigManager->LoadGameConfigFile("common.games/gamerules.games", &GamerulesConfig, error, sizeof(error)) && error[0] != '\0') { MF_Log("get/set_gamerules_* natives have been disabled because common.games/gamerules.games gamedata could not be read: %s", error); return; } void *address = nullptr; if (!CommonConfig->GetAddress("g_pGameRules", &address) || !address) { MF_Log("get/set_gamerules_* natives have been disabled because g_pGameRules address could not be found. "); return; } #if defined(KE_WINDOWS) GameRulesAddress = *reinterpret_cast<void***>(address); #else GameRulesAddress = reinterpret_cast<void**>(address); #endif }
void OnAmxxAttach() { initialze_offsets(); initialize_glb_offsets(); MF_AddNatives(engfunc_natives); MF_AddNatives(dllfunc_natives); MF_AddNatives(pev_natives); MF_AddNatives(forward_natives); MF_AddNatives(pdata_natives); MF_AddNatives(tr_Natives); MF_AddNatives(glb_natives); MF_AddNatives(ext2_natives); MF_AddNatives(misc_natives); g_kvd_glb.kvd.szClassName = const_cast<char *>(g_kvd_glb.cls.chars()); g_kvd_glb.kvd.szKeyName = const_cast<char *>(g_kvd_glb.key.chars()); g_kvd_glb.kvd.szValue = const_cast<char *>(g_kvd_glb.val.chars()); g_kvd_glb.kvd.fHandled = 0; }
void OnAmxxAttach() { initialze_offsets(); initialize_glb_offsets(); MF_AddNatives(engfunc_natives); MF_AddNatives(dllfunc_natives); MF_AddNatives(pev_natives); MF_AddNatives(forward_natives); MF_AddNatives(pdata_natives); MF_AddNatives(tr_Natives); MF_AddNatives(glb_natives); MF_AddNatives(ext2_natives); MF_AddNatives(misc_natives); g_kvd_2.szClassName = ""; g_kvd_2.szKeyName = ""; g_kvd_2.szValue = ""; g_kvd_glb.kvd = &g_kvd_2; }