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"
}
}
}
}