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

SDKCall not working anymore


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xerox8521
Senior Member
Join Date: Sep 2011
Old 11-20-2015 , 15:13   SDKCall not working anymore
Reply With Quote #1

Hi,

so i changed my SDKCalls from using offsets to signatures the calls for the CHL2MP_Player and CHL2MPRules work flawlessly. Problem i have now is that CBaseCombatWeapon doesn't seem to work anymore since the change. No invalid handle errors or invalid entities.

Game: ZPS

PHP Code:
// in plugin start
StartPrepSDKCall(SDKCall_Entity);
    
PrepSDKCall_SetFromConf(config,SDKConf_Signature,"CBaseCombatWeapon::GetClipWeight");
    
PrepSDKCall_AddParameter(SDKType_CBaseEntity,SDKPass_Pointer);
    
PrepSDKCall_SetReturnInfo(SDKType_Float,SDKPass_Plain);
    
hCBaseCombatWeapon_GetClipWeight EndPrepSDKCall(); 
call in test cmd
I made sure that wep is not -1 so its not because of that.
It just returns 0
PHP Code:
int wep GetEntPropEnt(client,Prop_Send,"m_hActiveWeapon");
if(
wep != -1)
{
    
PrintToChat(client,"Clip Weight: %f",SDKCall(hCBaseCombatWeapon_GetClipWeight,wep,wep));

Gamedata file
Code:
"Games"
{
    "zps"
    {
        "Signatures"
        {
            "CBaseCombatWeapon::GetClipWeight"
            {
                "library"    "server"
                "linux"      "@_ZN17CBaseCombatWeapon13GetClipWeightEv"
            }
        }
    }
}
xerox8521 is offline
Reply



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 19:50.


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