AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make a beacon go all the way to the sky (https://forums.alliedmods.net/showthread.php?t=309731)

eyal282 08-05-2018 11:38

How to make a beacon go all the way to the sky
 
I want to create a ring beacon that instead of growing larger it shrinks and it should go all the way to the sky from the ground.

edon1337 08-05-2018 13:20

Re: How to make a beacon go all the way to the sky
 
I'm not sure how this beacon works, but I can help you get sky height.

eyal282 08-05-2018 15:03

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by edon1337 (Post 2608329)
I'm not sure how this beacon works, but I can help you get sky height.

I can too and it will reach beyond sky idc much...

I need to make it though.

edon1337 08-05-2018 15:07

Re: How to make a beacon go all the way to the sky
 
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



eyal282 08-05-2018 15:13

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by edon1337 (Post 2608369)
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.

edon1337 08-05-2018 15:26

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by eyal282 (Post 2608375)
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?

eyal282 08-05-2018 16:02

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by edon1337 (Post 2608381)
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.

edon1337 08-05-2018 16:06

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by eyal282 (Post 2608392)
Find a JailBreak Last Request plugin and sesrch for beacon function there.

Quote:

Originally Posted by Black Rose (Post 2608098)
if someone needs help with something they supply the stuff I need.

You tell me.

eyal282 08-05-2018 16:40

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by edon1337 (Post 2608393)
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();
        }
}


edon1337 08-05-2018 16:42

Re: How to make a beacon go all the way to the sky
 
Quote:

Originally Posted by eyal282 (Post 2608401)
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


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

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