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

Members Online

»
0 Active | 82 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: JetPack Scripting Help
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Monday, Feb. 14, 2011 07:17 pm
No.

Your stats table goes into raw/modname/mp

Then it must be added to your mod.csv along with the material name etc. And then the mod recompiled.
Share |
[aL]RogeR
General Member
Since: Feb 13, 2011
Posts: 9
Last: Feb 22, 2011
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Monday, Feb. 14, 2011 10:08 pm
So the file goes in statsTable.csv goes in
call of duty4/raw/[modname]/mp

and in the csv it would be
Code:
stringtable,mp/statsTable.csv


or would it be
Code:
stringtable,[modname]/mp/statsTable.csv




Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoD4 Scripting
Posted: Monday, Feb. 14, 2011 10:21 pm
It would be

Code:
stringtable,mp/statsTable.csv
Share |
[aL]RogeR
General Member
Since: Feb 13, 2011
Posts: 9
Last: Feb 22, 2011
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Tuesday, Feb. 22, 2011 07:57 pm
Is it possible if someone could help me over xfire or teamviewer because I'm totally confused as to why it still isn't working :P

xfire: m477e0

Cheers :)
Share |
[aL]RogeR
General Member
Since: Feb 13, 2011
Posts: 9
Last: Feb 22, 2011
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Tuesday, Feb. 22, 2011 08:30 pm
I got tired with the shader error so I put the jetpack script into a map which is activated by a button. I now get these errors:

Code:
undefined is not an entity (line 55)
self.mover MoveGravity(0, 0, 10, 1);


and

Code:
cannot cast undefined to bool:(line 52)
while((self ButtonPressed( "BUTTON_SPACE" )) &&(self.rocketpackfuel != 0))

and the entire gsc script:
Code:
main()
{
	maps\mp\_load::main();
	
	ambientPlay("ambient_backlot_ext");
	
	game["allies"] = "sas";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "woodland";
	game["axis_soldiertype"] = "woodland";
	
	setdvar( "r_specularcolorscale", "1" );
	
	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");
	
	thread onPlayerConnecting();
}

onPlayerConnecting()
{
	for(;;)
	{
		level waittill( "connecting", player );

		player.rocketpack = false;
		player.rocketpackfuel = 20;
		player.rocketpackInUse = false;
		
		thread setupRocketPack();
	}
}

setupRocketPack()
{
	self endon("game_ended");
	self endon("disconnect");
	
	button = getent( "jetpack_button", "targetname" );
	button waittill( "trigger", player );

		self.rocketpackfuel = 20;
		self.mover = spawn( "script_origin", self.origin );
		self.mover.angles = self.angles;
		self linkto (self.mover);
		self.islinkedmover = true;
		
		while((self ButtonPressed( "BUTTON_SPACE" )) && (self.rocketpackfuel != 0))
		{		
//			vel = self GetVelocity();
			self.mover MoveGravity(0, 0, 10, 1);
			self.rocketpackInUse = true;
		}
		
		while((self.rocketpackInUse == true) && (self.rocketpackfuel != 0))
		{
		self.rocketpackfuel = (self.rocketpackfuel - 1);
		wait 0.1;
		}
		
		while( self ButtonPressed( "BUTTON_SPACE" ) == false )
		{
			self.rocketpackInUse = false;
		}
		
		while((self.rocketpackInUse == false) && (self.rocketpackfuel != 20))
		{
		
		self.rocketpackfuel = (self.rocketpackfuel + 1);
		wait 0.5;
		
		
		}
		
		if( self.health < 1 )
		{
			thread killrocketpack();
		}
	
	else if ( !self.rocketpack )
	{
		self.rocketpackInUse = false;
		self.rocketpackfuel = 20;
		thread killrocketpack();
	}
	

}

killrocketpack()
{
	self unlink();
	self.islinkedmover = false;
	self.mover Delete();
}



edited on Feb. 22, 2011 03:30 pm by [aL]RogeR
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Tuesday, Feb. 22, 2011 08:34 pm
You can't use ButtonPressed() because, well, it doesn't do anything.
Share |
[aL]RogeR
General Member
Since: Feb 13, 2011
Posts: 9
Last: Feb 22, 2011
[view latest posts]
Level 0
Category: CoD4 Scripting
Posted: Tuesday, Feb. 22, 2011 08:42 pm
Ok, is there any alternative?
Share |
CHS
General Member
Since: May 28, 2010
Posts: 106
Last: Mar 21, 2012
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Tuesday, Mar. 29, 2011 10:43 am
ADS, leave weapons and use while player aim down sight... not exactly fancy, but a temp solution to get it working at least definetly.
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»