Why wont this make a laserbeam, between the two clients..?
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
new laser
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage","do_laser","a")
}
public plugin_precache() {
laser = precache_model("sprites/laserbeam.spr")
}
public do_laser() {
new id = read_data(1)
new kid = read_data(2)
new origin[32][3]
get_user_origin(id, origin[id],1)
get_user_origin(kid, origin[kid],1)
message_begin(MSG_BROADCAST,SVC_TEMPENTITY) // I get a warning at this line saying, loose identation.
write_byte (TE_BEAMPOINTS)
write_coord(origin[id][0])
write_coord(origin[id][1])
write_coord(origin[id][2])
write_coord(origin[kid][0])
write_coord(origin[kid][1])
write_coord(origin[kid][2])
write_short(laser);
write_byte(1) // framestart
write_byte(5) // framerate
write_byte(2) // life
write_byte(5) // width
write_byte(1) // noise
write_byte(100) // r, g, b (red)
write_byte(100) // r, g, b (green)
write_byte(255) // r, g, b (blue)
write_byte(127) // brightness
write_byte(1) // speed
message_end()
}