Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-05-2018 , 15:07   Re: How to make a beacon go all the way to the sky
Reply With Quote #1

Try this

PHP Code:
Float:GetMaxHeightid 

    new 
Float:fOrigin] = { 0.00.00.0 }, pcCurrent;
    
    
pevid pev_origin fOrigin ); 
    
    while ( ( 
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_EMPTY ) || (  engfuncEngFunc_PointContents fOrigin ) == CONTENTS_SOLID ) )
    {
        
fOrigin] += 5.0
    }
    
    
pcCurrent engfuncEngFunc_PointContents fOrigin ); 

    if( 
pcCurrent == CONTENTS_SKY )
    {
        return 
fOrigin] -= 105.0;
    }
    return 
0.0

__________________
edon1337 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-05-2018 , 15:13   Re: How to make a beacon go all the way to the sky
Reply With Quote #2

Quote:
Originally Posted by edon1337 View Post
Try this

PHP Code:
Float:GetMaxHeightid 

    new 
Float:fOrigin] = { 0.00.00.0 }, pcCurrent;
    
    
pevid pev_origin fOrigin ); 
    
    while ( ( 
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_EMPTY ) || (  engfuncEngFunc_PointContents fOrigin ) == CONTENTS_SOLID ) )
    {
        
fOrigin] += 5.0
    }
    
    
pcCurrent engfuncEngFunc_PointContents fOrigin ); 

    if( 
pcCurrent == CONTENTS_SKY )
    {
        return 
fOrigin] -= 105.0;
    }
    return 
0.0

I need to create a beacon.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-05-2018 , 15:26   Re: How to make a beacon go all the way to the sky
Reply With Quote #3

Quote:
Originally Posted by eyal282 View Post
I need to create a beacon.
I already mentioned in my first post, I have no idea what a beacon was. Is it a TE_BEAMRING?
__________________
edon1337 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-05-2018 , 16:02   Re: How to make a beacon go all the way to the sky
Reply With Quote #4

Quote:
Originally Posted by edon1337 View Post
I already mentioned in my first post, I have no idea what a beacon was. Is it a TE_BEAMRING?
I think. Find a JailBreak Last Request plugin and sesrch for beacon function there.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-05-2018 , 16:06   Re: How to make a beacon go all the way to the sky
Reply With Quote #5

Quote:
Originally Posted by eyal282 View Post
Find a JailBreak Last Request plugin and sesrch for beacon function there.
Quote:
Originally Posted by Black Rose View Post
if someone needs help with something they supply the stuff I need.
You tell me.
__________________

Last edited by edon1337; 08-05-2018 at 16:07.
edon1337 is offline
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 #6

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
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-05-2018 , 16:42   Re: How to make a beacon go all the way to the sky
Reply With Quote #7

Quote:
Originally Posted by eyal282 View Post
I want to set the beacon's height to the sky ( the concept is to make a playzone like in PUBG )
Already done, check my CS PUBG mod, just one thing, it uses normal straight line beams instead of ring beams
https://forums.alliedmods.net/showthread.php?t=309613
__________________
edon1337 is offline
Reply



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