Better to use TE_BEAMENTPOINT instead of TE_BEAMPOINTS and use the player id of the player that is looking at the target as the starting entity.
Code:
write_byte(0)
write_coord(floatround(Origin[0]))
write_coord(floatround(Origin[1]))
write_coord(floatround(Origin[2]))
write_coord(floatround(OriginTarget[0]))
write_coord(floatround(OriginTarget[1]))
write_coord(floatround(OriginTarget[2]))
Code:
write_byte(TE_BEAMENTPOINT)
write_short(id | 0x1000)
write_coord(floatround(OriginTarget[0]))
write_coord(floatround(OriginTarget[1]))
write_coord(floatround(OriginTarget[2]))
If you don't take this suggestion, at least use the TE_BEAMPOINTS constant instead of 0.
Also, you should use pcvars.
__________________