Page 1 of 1

Is CoD2 scripting same as CoD4 ?

Posted: Thu Jan 16, 2014 10:28 pm
by stevomitric
hey Mitch. its me... again.

As the subject said. can i create cod2 scripts that can run on cod4 ? or is cod4 same as cod2 just modefied a little ?

So i used Bigjump script ( command ) from cod2 ( used in botzombie mod ) :

Code: Select all

init()
{
	thread bigjump();
}
bigjump() 
{
	setcvar("bigjump", "0"); 

	if(getCvar("bigjump")=="")
{
	setCvar("bigjump", "0");
}

for(;;) 
{
	if(getcvar("bigjump")=="1") 
	{
		setcvar("jump_height", 128);
		setcvar("jump_ladderPushVel", 1024);
		setcvar("jump_slowdownEnable", 0);
		setcvar("jump_spreadAdd", 512);
		setcvar("jump_stepSize", 64);
		setcvar("bigjump", ""); 
		IPrintLnBold( "Bigjump has been ENABLED by server ^1ADMINISTRATOR" );	// delete this line if you don't wont any message
	}
	wait 0.05; 

	if(getcvar("bigjump")=="0") 
	{

		setcvar("jump_height", 39); 
		setcvar("jump_ladderPushVel", 128);
		setcvar("jump_slowdownEnable", 1);
		setcvar("jump_spreadAdd", 64);
		setcvar("jump_stepSize", 18);
		setcvar("bigjump", "");
		IPrintLnBold( "Bigjump has been DISABLED by server ^1ADMINISTRATOR" );	// delete this line if you don't wont any message
	}
	wait 0.05;

	if(getcvar("bigjump")=="2") 

	{

		setcvar("jump_height", 39); 
		setcvar("jump_ladderPushVel", 128);
		setcvar("jump_slowdownEnable", 0);
		setcvar("jump_spreadAdd", 64);
		setcvar("jump_stepSize", 18);
		setcvar("bigjump", "");
		IPrintLnBold( "Bigjump has been set to JUMPER mod by server ^1ADMINISTRATOR" );	// delete this line if you don't wont any message
	}
	wait 0.05; 
}
}
ye.. on CoD2 runs with no problem. ( it is like rcon command /rcon bigjump 1 .. as u can see )
so, i puted it in CoD4 main folder and funny thing is that it doesnt work.. its like it doesnt "see" script at all ( /rcon bigjump 1 = command unknow.. hmmmm )

btw i cant seem to find "maps" folder in cod4 at all ...

Re: Is CoD2 scripting same as CoD4 ?

Posted: Fri Jan 17, 2014 11:15 am
by Mitch
In cod4 getcvar en setcvar are called setdvar and getdvar.

See: http://znation.nl/cod4script/

Re: Is CoD2 scripting same as CoD4 ?

Posted: Sun Mar 02, 2014 11:27 pm
by [ZN]Puissant
Inactivity, closing topic