Raised This Month: $ Target: $400
 0% 

Teleport bomb carrier to bomb site.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-17-2017 , 05:34   Re: Teleport bomb carrier to bomb site.
Reply With Quote #11

Quote:
Originally Posted by wickedd View Post
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 ] )
}*/ 
Why are you specifying the coordinates? You can just use pev_origin with info_bomb_target / func_bomb_target as the entity.
__________________
edon1337 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 17:18.


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