have found a better way:
Code:
new vec1[3],Float:velocity[3],speed = 600
get_user_origin(id,vec1,1)
velocity_by_aim(id,speed,velocity)
#define TE_USERTRACER 127 // larger message than the standard tracer, but allows some customization.
// coord (origin)
// coord (origin)
// coord (origin)
// coord (velocity)
// coord (velocity)
// coord (velocity)
// byte ( life * 10 )
// byte ( color ) this is an index into an array of color vectors in the engine. (0 - )
// byte ( length * 10 )
message_begin(MSG_ALL,SVC_TEMPENTITY)
write_byte(127) // TE_BEAMPOINTS)
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(floatround(velocity[0]))
write_coord(floatround(velocity[1]))
write_coord(floatround(velocity[2]))
write_byte(10) // Life
write_byte(1) //Color:1=red,2=green,max 12 colors
write_byte(500) //Higher value-> smaller tracers,lower = bigger tracers
message_end()
But there is a problem:the trace fly through walls.
__________________