Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 5 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Some help at Teleport Script
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Oct. 27, 2010 08:38 pm
Hello.
I try to make Move Script (Write Command, X Y Z and you move Player)
If any1 know then plis Edit my Script.
My Script is here
Admin()
{
if(getcvar("setpos") != "")
{
players=getentarray("player","classname");
tokkens=strtok(getcvar("setpos"),"|");
players[tokkens[0]] setOrigin((int(tokkens[1]),int(tokkens[2]),int(tokkens[3])));
players[tokkens[0]] iprintlnbold("^1Moved by ADMIN");
setcvar("setpos","");
}
}
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Oct. 28, 2010 06:50 am
This should do:

Code:

main()
{
	setCvar( "setpos", "" );
	
	while(1)
	{	
		if( getCvar( "setpos" ) != "" )
			thread setPosition();
	
		wait 0.05;
	}
}

setPosition()
{
	// when entering the command, do /setpos ID X Y Z
	string = StrTok( getCvar( "setpos" ), " " );
	setCvar( "setpos", "" );
	
	players = getEntArray( "player", "classname" );
	for( i = 0; i < players.size; i++ )
	{
		if( players[i] getEntityNumber() == int( string[0] ) )
		{
			// safety check
			if( isDefined( string[1] ) && isDefined( string[2] ) && isDefined( string[3] ) )
			{
				players[i] setOrigin( int( string[1] ), int( string[2] ), int( string[3] ) );
				players[i] iPrintLnBold( "Moved by the Admin" );
			}
		}
	}
}


edited on Oct. 28, 2010 02:51 am by Xylozi
Share |
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Oct. 28, 2010 07:37 am
Ty very much :)

Can u tell me what Command is it?

edited on Oct. 28, 2010 06:23 am by lineage2soul
Share |
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Oct. 28, 2010 03:28 pm
Can u tell me full command for script? plis.
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Oct. 29, 2010 02:03 am
/rcon setpos 0 100,200,300

0 = ID
100 = X
200 = Y
300 = Z
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Oct. 29, 2010 09:55 am
Why don't we just install the script for you as well?
Share |
lineage2soul
General Member
Since: Oct 25, 2010
Posts: 24
Last: Nov 8, 2010
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Friday, Oct. 29, 2010 05:22 pm
can you just shut up if you don't know how to help then f@ck off.

edited on Oct. 29, 2010 01:22 pm by lineage2soul
Share |
tHMatt
General Member
Since: Sep 11, 2007
Posts: 473
Last: Mar 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Saturday, Oct. 30, 2010 05:53 am
I might start playing WoW again
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»