To make lightning:
Code:
#define TE_BEAMPOINTS 0
new light;
public plugin_precache()
{
light = precache_model("sprites/lgtning.spr");
}
Code:
//
new iOrigin[3];
get_user_origin(id, iOrigin);
message_begin( MSG_BROADCAST,SVC_TEMPENTITY,iOrigin );
write_byte ( TE_BEAMPOINTS );
write_coord( iOrigin[0] );
write_coord( iOrigin[1] );
write_coord( iOrigin[2] - 25 );
write_coord( iOrigin[0] + random_num(75,150) );
write_coord( iOrigin[1] + random_num(75,150) );
write_coord( iOrigin[2] + 800 );
write_short( light );
write_byte ( 1 );
write_byte ( 5 );
write_byte ( 2 );
write_byte ( 20 );
write_byte ( 30 );
write_byte ( 200 ); // red
write_byte ( 200 ); // green
write_byte ( 200 ); // blue
write_byte ( 200 );
write_byte ( 200 );
message_end();
Code:
#define TE_BEAMPOINTS 0 // beam effect between two points
// coord coord coord (start position)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
__________________