Raised This Month: $ Target: $400
 0% 

Teleport after 3 seconds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 02-03-2009 , 15:18   Teleport after 3 seconds
Reply With Quote #1

Hello.
Could someone please edit this snippet for me, so it teleports all players after 3 seconds? I dont have an idea how to to that Thanks.
Code:
public jc_start_cup(id)
{ 
	for( new i = 0 ; i < 33; i++)
	{ 
		finish_locs[i][0] = 0.0
		finish_locs[i][1] = 0.0
		finish_locs[i][2] = 0.0
		climber[i] = "" 
	} 
	
	cup_start_id = id 
	
	cup_start_time = -1 
	cup_status = CUP_STATUS_RUNNING 
	
	announcments = 0 
	if( cup_rr_start )
	{ 
		set_cvar_string( "sv_restartround", "1") 
		set_cvar_string( "kz_checkpoints", "0")
		set_cvar_string( "amx_pausecfg", "pause prokreedz_hook")
		set_task(1.0,"time_remaining",8638459,"",0,"b") 
		client_print(0,print_chat,"[%s] Jump Cup has been started!", jc_pluginname ) 
	} 
	else
	{ 
		set_cvar_string( "kz_checkpoints", "0")
		cup_start_countdown = CUP_START_COUNTDOWN 
		
		set_task(1.0,"start_countdown",8638458,"",0,"b") 
		
		new Float:vOrigin[3];
		pev(id, pev_origin, vOrigin);
		new players[32], num;
		get_players(players, num, "ach", "");
		for( new i = 0; i < num; i++ )

		client_print(0,print_chat,"[%s] Jump Cup will start in %d seconds!", jc_pluginname, cup_start_countdown ) 
	} 
	
	set_task(2.5,"enable_godmode",8638457,"",0) 
	
	return PLUGIN_HANDLED 
}
__________________
Ahujena
mazmaajinsh is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 02-03-2009 , 16:36   Re: Teleport after 3 seconds
Reply With Quote #2

teleport to...
__________________

padilha007 is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 02-04-2009 , 07:38   Re: Teleport after 3 seconds
Reply With Quote #3

it should teleport players to location where player who used a command to start cup is standing.
__________________
Ahujena
mazmaajinsh is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-05-2009 , 03:26   Re: Teleport after 3 seconds
Reply With Quote #4

You have to make a random origin near the admin's origin; you can't move all players to the same origin, i think...

Try this
PHP Code:
public commandid )
{
    new
    
FloatpOrigin],
    
MyArray35 ] = { 01, ... },
    
ijrandtemp35 ];
        
    
pevidpev_originpOrigin );
    
    for( ; 
35i++ )
    {
        
rand random_num2560 );
        if( !
temprand ] )
        {
            
MyArray] = rand;
            
temprand ] = 1;
        }
        else --
i;
    }
    
    for( 
1<= g_maxplayersi++ )
    {
        if( !
is_user_alive) )
            continue;
            
        for( 
035i++ )
            
engfuncEngFunc_SetOriginjMyArray] );
    }
    
    return 
PLUGIN_HANDLED;

Credit
__________________

anakin_cstrike is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-05-2009 , 08:15   Re: Teleport after 3 seconds
Reply With Quote #5

why? maybe he is using semiclip. or just while teleporting set both to solid_not, and then to normal with settask
__________________
xPaw is offline
Old 02-05-2009, 08:24
SnoW
This message has been deleted by SnoW. Reason: This isn't needed here lol.
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 02-08-2009 , 16:53   Re: Teleport after 3 seconds
Reply With Quote #7

Quote:
Originally Posted by xPaw View Post
why? maybe he is using semiclip. or just while teleporting set both to solid_not, and then to normal with settask
thats right, im using semiclip
__________________
Ahujena
mazmaajinsh is offline
Old 02-09-2009, 08:35
anakin_cstrike
This message has been deleted by anakin_cstrike. Reason: opss
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-09-2009 , 08:37   Re: Teleport after 3 seconds
Reply With Quote #9

Then this is enough
PHP Code:
#include <amxmodx>
#include <fakemeta>

new FloatfOrigin], g_maxplayers;
public 
plugin_init()
{
    
g_maxplayers get_maxplayers();
}

public 
commandid )
{
    
pevidpev_originfOrigin );
    
set_task3.0"teleport" );
}

public 
teleport()
{
    for( new 
1<= g_maxplayersi++ )
    {
        if( !
is_user_alive) )
            continue;
        
engfuncEngFunc_SetOriginifOrigin );
    }

__________________

anakin_cstrike is offline
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 02-13-2009 , 17:06   Re: Teleport after 3 seconds
Reply With Quote #10

Quote:
Originally Posted by anakin_cstrike View Post
Then this is enough
PHP Code:
#include <amxmodx>
#include <fakemeta>

new FloatfOrigin], g_maxplayers;
public 
plugin_init()
{
    
g_maxplayers get_maxplayers();
}

public 
commandid )
{
    
pevidpev_originfOrigin );
    
set_task3.0"teleport" );
}

public 
teleport()
{
    for( new 
1<= g_maxplayersi++ )
    {
        if( !
is_user_alive) )
            continue;
        
engfuncEngFunc_SetOriginifOrigin );
    }

this works, but it doesnt teleport to location of the player who used command. it teleports to someone else.
__________________
Ahujena
mazmaajinsh 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 01:41.


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