Hello Guyz, anyone know how to fix that ?
Quote:
WeaponDHookOnDropPost
L 07/06/2018 - 06:06:27: [SM] Exception reported: Trying to get value for null pointer.
|
PHP Code:
hDHookWeaponDropPost = DHookCreate(DHook_WeaponDrop, HookType_Entity, ReturnType_Void, ThisPointer_Ignore, WeaponDHookOnDropPost);
DHookAddParam(hDHookWeaponDropPost, HookParamType_CBaseEntity);
I also tryed
hDHookWeaponDropPost = DHookCreate(DHook_WeaponDrop, HookType_Entity, ThisPointer_CBaseEntity, ThisPointer_Ignore, WeaponDHookOnDropPost);
DHookAddParam(hDHookWeaponDropPost, HookParamType_CBaseEntity);
Also if i use that code in OnPluginStart I am not able to connect, but i didnt see any crash
DHookAddEntityListener(ListenType_Created, WeaponsOnCreated);
DHookAddEntityListener(ListenType_Deleted, WeaponsOnDeleted);
When i use them at MapStart Is OK
When i use only ListenType_Created, I am not able to connect
Game CS:GO what could be wrong?
And I also have a misunderstanding how to block trace or allow the trace in the TraceAttack, anyone can help me with that pls? I need to see correct method for that hook. Thanks a million
CBasePlayer::TraceAttack(CTakeDamageInfo &inputInfo, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator )
Quote:
//hDHookTraceAttack = DHookCreate(DHook_TraceAttack, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, DamageDHookOnTraceAttack);
//DHookAddParam(hDHookTraceAttack, HookParamType_ObjectPtr, -1, DHookPass_ByRef);
//DHookAddParam(hDHookTraceAttack, HookParamType_VectorPtr);
//DHookAddParam(hDHookTraceAttack, HookParamType_Object, 20, DHookPass_ByVal|DHookPass_ODTOR|DHookPass_OCT OR|DHookPass_OASSIGNOP); //trace_t is a union of 12 (float[3]) ??????
|
__________________