Hi,
so i tried to mess around a bit with sdkhooks in zps and it seems not everything is working such as SDKHook_UsePost and SDKHook_Use. Maybe im using it wrong ? Also what i noticed is that some entities have the same entity number shouldnt be the entity numbers unique ? I logged every entity which is created and quite a few have the same entity index (i assume it is)
PHP Code:
entity: 19 | classname: item_healthvial
entity: 19 | classname: item_healthkit
PHP Code:
public OnEntityCreated(entity, const String:classname[])
{
if(StrEqual(classname,"item_healthvial") || StrEqual(classname,"item_healthkit"))
{
SDKHook(entity,SDKHook_UsePost,OnItemUse);
}
}
public OnItemUse(entity, activator, caller, UseType:type, Float:value)
{
PrintToChatAll("entity: %d | activator: %d | caller: %d | UseType: %d | value: %f",entity,caller,type,value);
}