In fakemeta_const.inc, the first variable type after the EngFunc and DLLFunc commands is the return variable type, which is in this case "void". That tells you that EngFunc_TraceLine does not return anything at all.
What you need to do to get results from TraceLine is to hook FM_TraceLine. Use the parameters after the word "void" to get the parameters of the hook.
(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
Those are the parameters that are sent, and thus hooked through FM_TraceLine. Use register_forward() to hook it.
Your function will look something like
public hook_traceline( Float:v1[3], Float:v2[3], nomonsters, id, ptr ) {
On a separate note, to actually accomplish anything with the traceline hook, use the TraceResult stuff inside fakemeta_const:
enum TraceResult
{
TR_AllSolid, // int
TR_StartSolid, // int
TR_InOpen, // int
TR_InWater, // int
TR_flFraction, // float
TR_vecEndPos, // float array[3]
TR_flPlaneDist, // float
TR_vecPlaneNormal, // float array[3]
TR_pHit, // int (edict_t*)
TR_iHitgroup, // int
};
Search the forums for any of those and you'll get some code examples.
__________________
|