Raised This Month: $51 Target: $400
 12% 

Get weapon index


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 10-29-2016 , 08:52   Get weapon index
Reply With Quote #1

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_Reloadvoid)
{
    
    
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

Last edited by keygens; 10-29-2016 at 08:53.
keygens is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode