Code:
#define TE_BEAMPOINTS 0 // beam effect between two points
new origin[3],originhit[3]
get_user_origin(id,origin)
get_user_origin(id,origin,3) //Mode 3 gets where the bullet will hit.
message_begin(MSG_ ,SVC_TEMPENTITY)
write_byte(TE_BEAMPOINTS)
write_coord(origin[0]) // start position
write_coord(origin[1])
write_coord(origin[2])
write_coord(originhit[0]) // end position
write_coord(originhit[1])
write_coord(originhit[2])
//You can fill in the rest
write_short() // sprite index
write_byte() // starting frame
write_byte() // frame rate in 0.1's
write_byte() // life in 0.1's
write_byte() // line width in 0.1's
write_byte() // noise amplitude in 0.01's
write_byte() // Red
write_byte() // Green
write_byte() // Blue
write_byte() // brightness
write_byte() // scroll speed in 0.1's
message_end()