Quote:
Originally Posted by edon1337
You tell me.
|
I don't recall where I took it from but its author is H3avY Ra1n (AKA nikhilgupta345)
I want to set the beacon's height to the sky ( the concept is to make a playzone like in PUBG )
Code:
public StartBeacon()
{
if( g_iCurrentGame == LR_NONE )
{
return;
}
new id;
for( new i = 0; i < 2; i++ )
{
id = g_iLastRequest[ i ];
static origin[3]
emit_sound( id, CHAN_ITEM, g_szBeaconSound, 1.0, ATTN_NORM, 0, PITCH_NORM )
get_user_origin( id, origin )
message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
write_byte( TE_BEAMCYLINDER )
write_coord( origin[0] ) //position.x
write_coord( origin[1] ) //position.y
write_coord( origin[2]-20 ) //position.z
write_coord( origin[0] ) //axis.x
write_coord( origin[1] ) //axis.y
write_coord( origin[2]+200 ) //axis.z
write_short( g_iSprite ) //sprite index
write_byte( 0 ) //starting frame
write_byte( 1 ) //frame rate in 0.1's
write_byte( 6 ) //life in 0.1's
write_byte( 10 ) //line width in 0.1's
write_byte( 1 ) //noise amplitude in 0.01's
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT:
{
write_byte( 0 );
write_byte( 0 );
write_byte( 255 );
}
case CS_TEAM_T:
{
write_byte( 255 );
write_byte( 0 );
write_byte( 0 );
}
}
write_byte( 255 ); // brightness
write_byte( 0 ); // scroll speed in 0.1's
message_end();
}
}
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334