Hello. Trying to declare CBaseCombatWeapon::ReloadOrSwitchWeapons(CBas eCombatWeapon *this), but forward return nothing.I mean does not work at all. IDA show g_pEntityList for this function, and i guess that need declare in code too for properly work? Anyway, my code is:
PHP Code:
DETOUR_DECL_MEMBER0(Weapon_Switch_or_Reload, void)
{
int weapon_index = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseCombatWeapon *>(this)); cell_t result = Pl_Continue;
g_pWeaponSwitch_or_Reload->PushCell(weapon_index);
g_pWeaponSwitch_or_Reload->Execute(&result);
if(result == Pl_Continue)
{
DETOUR_MEMBER_CALL(Weapon_Switch_or_Reload)();
}
return;
}
Thanks in advance