Raised This Month: $ Target: $400
 0% 

How to make a beacon go all the way to the sky


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-05-2018 , 16:40   Re: How to make a beacon go all the way to the sky
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
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

Last edited by eyal282; 08-05-2018 at 16:41.
eyal282 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode