Is CoD2 scripting same as CoD4 ?

Locked
User avatar
stevomitric
Posts: 52
Joined: Mon Apr 01, 2013 6:35 pm
Location: Bosnia And Herzegovina ( bosna i hercegovina ( BIH ))

Is CoD2 scripting same as CoD4 ?

Post 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 ...
Image
User avatar
Mitch
Site Admin
Posts: 195
Joined: Sat Mar 02, 2013 10:45 pm

Re: Is CoD2 scripting same as CoD4 ?

Post by Mitch »

In cod4 getcvar en setcvar are called setdvar and getdvar.

See: http://znation.nl/cod4script/
Image
User avatar
[ZN]Puissant
Moderator
Posts: 72
Joined: Mon Mar 04, 2013 3:10 pm

Re: Is CoD2 scripting same as CoD4 ?

Post by [ZN]Puissant »

Inactivity, closing topic
Image

~ Always here to help ~
~ Good joker ~
Locked