Quote:
Originally Posted by swapped
PHP Code:
get_user_origin( index, origin[3], mode = 0 )
Code:
0 - current position.
1 - position from eyes (weapon aiming).
2 - end position from player position.
3 - end position from eyes (hit point for weapon).
4 - position of last bullet hit (only CS).
|
I dont trust that at all.
For me it was giving false origins.
Instead i use this:
PHP Code:
RegisterHam(Ham_TraceAttack, "worldspawn", "traceattack")
public traceattack(victim, attacker, Float:damage, Float:direction[3], tr, damage_type)
{
static Float:origin[3]
get_tr2(tr, TR_vecEndPos, origin)
}
If you want to use your last bullet origin in somewhere else at ohter time then just do:
PHP Code:
new Float:lastbullet_origin[id][3]
public traceattack(victim, attacker, Float:damage, Float:direction[3], tr, damage_type)
{
get_tr2(tr, TR_vecEndPos, lastbullet_origin[attacker])
}