[help] Carepackage code

Posts 1–15 of 34 · Page 1 of 3
[help] Carepackage code
Hey,
I'm kinda new to this whole modding. I can't write my own mod, but I can edit others. But here's my question: I want to make bunker of carepackages in a map in a zombie mod. Can someone help me with this.
Thank you in advance.
http://www.mpgh.net/forum/279-call-d...ates-maps.html this is for the coordinates

this is the code for care packages, put this into onplayerspawned()
Code:
		if(self isHost())
		{
			if((getDvar("mapname") == "mp_terminal") && ((!isDefined(level.SpawnedStuff)) || (!level.SpawnedStuff)))
				self ssbunker();
		}
and then make a this thread
Code:
ssbunker()
{
level.SpawnedStuff = 1;

//OK
carepack = spawn("script_model", (000, 000, 000) ); //coordinates 
carepack setModel( "com_plasticcase_enemy" ); //color, red enemy, green friendly
carepack Solid(); //if you want solid, delete if not
carepack31.angles = (0, 90, 0); //to change direction
carepack CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); //must need this
}
if this is done correctly u should end up with a solid care package in the spot you want, good luck
Quote Originally Posted by schiz View Post
http://www.mpgh.net/forum/279-call-d...ates-maps.html this is for the coordinates

this is the code for care packages, put this into onplayerspawned()
Code:
		if(self isHost())
		{
			if((getDvar("mapname") == "mp_terminal") && ((!isDefined(level.SpawnedStuff)) || (!level.SpawnedStuff)))
				self ssbunker();
		}
and then make a this thread
Code:
ssbunker()
{
level.SpawnedStuff = 1;

//OK
carepack = spawn("script_model", (000, 000, 000) ); //coordinates 
carepack setModel( "com_plasticcase_enemy" ); //color, red enemy, green friendly
carepack Solid(); //if you want solid, delete if not
carepack31.angles = (0, 90, 0); //to change direction
carepack CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); //must need this
}
if this is done correctly u should end up with a solid care package in the spot you want, good luck
that wont be helpful unless he knows how to thread things and he mostlikely dosnt
well i think he does he said he can edit mods.. what can he edit without knowing how to make a thread?
Quote Originally Posted by schiz View Post
well i think he does he said he can edit mods.. what can he edit without knowing how to make a thread?
i know how to thread but i didn't know it was called thread umm i just keep proving how smart i am
But I need a clean _rank.gsc, does anyone know how to get one? (for the coordinates)
for clean rank.gsc download ff veiwer (not hard to find search forum or google). run it, and open your patch_mp.ff file (c:/Program files/steam/steamapps/common/codmw2/zone/english/patch_mp.ff) once you open ur patch_mp.ff file ull see alot of files in it, find _rank and open it and copy everything in it. make a new gsc file called _rank and paste everything into it.. ther eu have a clean _rank
Quote Originally Posted by schiz View Post
for clean rank.gsc download ff veiwer (not hard to find search forum or google). run it, and open your patch_mp.ff file (c:/Program files/steam/steamapps/common/codmw2/zone/english/patch_mp.ff) once you open ur patch_mp.ff file ull see alot of files in it, find _rank and open it and copy everything in it. make a new gsc file called _rank and paste everything into it.. ther eu have a clean _rank
that was long. cant you just empty a file the put the code in
Ok, and what if I wanted more than 1 care package?
i know that. after the first one
Code:
carepack = spawn("script_model", (000, 000, 000) ); //coordinates 
carepack setModel( "com_plasticcase_enemy" ); //color, red enemy, green friendly
carepack Solid(); //if you want solid, delete if not
carepack31.angles = (0, 90, 0); //to change direction
carepack CloneBrushmodelToScriptmodel( level.airDropCrateCollision ); //must need thi
it gets numbered
for example
Code:
carepack = spawn("script_model", (2850, 164, 165) ); 
carepack setModel( "com_plasticcase_friendly" );
carepack Solid();
carepack CloneBrushmodelToScriptmodel( level.airDropCrateCollision );

carepack2 = spawn("script_model", (2850, 132, 146) ); 
carepack2 setModel( "com_plasticcase_friendly" );
carepack2 Solid();
carepack2 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );

carepack3 = spawn("script_model", (2850, 164, 190) ); 
carepack3 setModel( "com_plasticcase_friendly" );
carepack3 Solid();
carepack3 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
and to get moving parts are
Code:
closeDoor()
{
if(getDvar("mapname") == "mp_afghan")
{
	level.door1 moveto((1594, -168, 150), 2);
	
	level.door2 moveto((1594, -168, 178), 2);
}
}
you need that somewere in the file then you put
Code:
level.door1 = spawn("script_model", (1594, -168, 10) ); 
	level.door1 setModel( "com_plasticcase_friendly" );
	level.door1 Solid();
	level.door1.angles = (0, 90, 0);
	level.door1 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
	
	level.door2 = spawn("script_model", (1594, -168, 10) ); 
	level.door2 setModel( "com_plasticcase_friendly" );
	level.door2 Solid();
	level.door2.angles = (0, 90, 0);
	level.door2 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
and thats it(stole code from nukems no hope zombie mod
yah i think its gonna take a while
Quote Originally Posted by schiz View Post
yah i think its gonna take a while
like i said let the whiting begin (i just cant let you get last reply)
Ok. I have got a new problem. I can't see the boxes appearing
They just won't come. I have tried many coordinates but none work.
What am I doing wrong?
Code:
onPlayerSpawned()
{
	self endon( "disconnect" );
		if(self isHost())
		{
			if((getDvar("mapname") == "mp_afghan") && ((!isDefined(level.SpawnedStuff)) || (!level.SpawnedStuff)))
				self ssbunker();
		}


	for(;;)
	{
		self waittill( "spawned_player" );

		self thread monitorSprintDistance();
	}
}
ssbunker()
{
level.SpawnedStuff = 1;

carepack = spawn("script_model", (2785, 1107, 85) );
carepack setModel( "com_plasticcase_friendly" );
carepack Solid();
carepack CloneBrushmodelToScriptmodel( level.airDropCrateCollision );

carepack2 = spawn("script_model", (554, -223, 54) );
carepack2 setModel( "com_plasticcase_friendly" );
carepack2 Solid();
carepack2 CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
}
Posts 1–15 of 34 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us