Quote:
Originally Posted by gubka
Hello Guyz, anyone know how to fix that ?
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?
|
Can you please post a complete testcase for debugging?
You can check if a parameter is NULL using the DHookIsNullParam native before trying to get its value.
Your second weapondrop hook try isn't using valid enums. Which dhooks version are you running exactly? Why don't you use sdkhooks which already provides both of these hooks?
__________________