View Single Post
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-16-2017 , 16:01   Re: Teleport bomb carrier to bomb site.
Reply With Quote #8

Here you go, this will teleport the player with the bomb to bombsite B in Dust2. It will teleport them after the
freeze time is over.
PHP Code:
#include < amxmodx >
#include < fun >

new const bomb_orgin[ ][ ] =
{
    { -
1555275936 },  // Bombsite coordinates
    
{ -1623266036 },
    { -
1540262336 }
}

public 
plugin_init( )
{
    
register_plugin"Bomb Teleport""1.0""Suhdude" )
    
register_logevent"start_round"2"1=Round_Start" )  
    
//register_clcmd( "say /get", "job" )  // uncomment this to get coordinates
    
}

public 
start_round( )
{
    new 
players32 ], inumidi
    get_players
playersinum"ae""TERRORIST" )
    
    for( 
0inumi++ )
    {
        
id players]
        if( 
user_has_weaponidCSW_C4 ) ) 
        {
            
set_task0.9"move"id  )
        }
    }
}

public 
moveid )
{
    new 
p_origin]
        
    
p_origin bomb_orginrandomsizeofbomb_orgin ) ) ]
    
set_user_originidp_origin )
    
    
remove_taskid )
}

/*public job( id )
{
    new origin[ 3 ]
    get_user_origin( id, origin )
    
    log_amx( "%i | %i | %i", origin[ 0 ], origin[ 1 ], origin[ 2 ] )
}*/ 
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 11-16-2017 at 16:20.
wickedd is offline