PHP Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_forward(FM_PlayerPreThink, "forward_prethink")
}
public forward_prethink(id)
{
if(pev( id, pev_button ) & IN_USE && !(pev( id, pev_oldbuttons ) & IN_USE ))
{
new Index,Body
get_user_aiming(id,Index,Body,200)
if(!Index || !is_user_alive(Index))
return;
new Float:v1[3]
new Float:v2[3]
new monster
engfunc(EngFunc_TraceLine,v1,v2,Index,monster)
client_print(id, print_chat, "[AMXX TEST] V1: %f-%f-%f V2:%f-%f-%f M:%s", v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], monster)
}
}
The line is always 0.000000 0.0000000 0.00000 is alwayas the results. Why?
Note: This is my first Try at this. I followed what was seen in the file.
Code:
EngFunc_TraceLine, // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr);
Thank You