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

Members Online

»
1 Active | 54 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of DutyŽ: WWII
CoD WW2 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
Category: CoD+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: CoD 2 mod ---> CoD 1 mod
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 01:02 pm
i found this really cool killingspree mod for CoD, only its too bad its CoD2...
Now if anyone could make this mod into an CoD1 mod (not UO) i would thank him/her on my knees :bowdown:

http://callofduty.filefront.com/file/Nukes_Unreal_Killing_Spree_Mod;70665


thanks in advance,

SauSje
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 01:04 pm
Euuhhmm... we're a site about *helping* people.. not doing their work for them.

We're all willing to help with any problems you have converting this mod, but at least TRY yourself.
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 01:07 pm
i tryed, but im a noob when it comes to scripting..

but this is like japanese for me :\
Code:
Messages(sMeansOfDeath, attacker)
{

		killcount = undefined;
		self.pers["kill_spree"] = 0;
//if(getCvar("spree") == "")
//		setCvar("spree", "0");


	if(sMeansOfDeath == "MOD_HEAD_SHOT")
	{
		distance = distance(Attacker.origin , self.origin); //Inches
		meters = distance * 0.0254;		          //Meters
		feet = distance / 12;			         //Feet

		if(!isDefined("shm_metric") || getcvar("shm_metric") == "")
		setcvar("shm_metric", "meters");

		if(getCVar("shm_metric") != "feet")
		{
		attacker iprintlnBold("^1You ^7made a ^1HeadShot^7 over a distance of ^3" + meters + " ^7meters!"); 				//Message to attacker
		attacker playlocalSound("headshot");//voice message to attacker

		self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 via a ^1Headshot^7 over a distance of ^3" + meters + "^7 meters!"); 	//Message to death person
		self playlocalSound("headshot"); //voice message to dead person

		iprintln("^1" + attacker.name + "^7 killed ^1" + self.name + "^7 with a headshot over a distance of ^1" + meters + " meters!"); 		//Message to every player
		iprintln("^3coded by ^7|^1A^4c^7E|^1Nuke ^7|^3 www.clancups.com^");
		}

		if(getCVar("shm_metric") == "feet")
		{
		attacker iprintlnBold("^1You ^7made a ^1HeadShot^7 over a distance of ^3" + feet + " ^7feet!"); 				//Message to attacker
		self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 via a ^1Headshot^7 over a distance of ^3" + feet + "^7 feet!"); 	//Message to death person
		iprintln("^1" + attacker.name + "^7 killed ^1" + self.name + "^7 with a headshot over a distance of ^1" + feet + " feet!"); 		//Message to every player
		}
	}


		attacker.pers["kill_spree"]++;//this is ok
		killcount = attacker.pers["kill_spree"];



	        if(killcount == 3)
		
			{
			//iprintln(killcount);
			iprintln("^5" + attacker.name + "^7 is on a ^1killing spree!");
			attacker iprintlnBold("^1You ^3are on a ^1Killing Spree!");
			//iprintln("^1Unreal Killing Spree | Coded by Nuke^ www.clancups.com");
			//playSoundOnPlayers("killingspree");
			self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 who is on a ^1Killingspree!");
			self playlocalSound("killingspree");
			attacker playlocalSound("killingspree");
			}
			
		if(killcount == 4)
		
			{
			//iprintln(killcount);
			iprintln("^1" + attacker.name + "^7 is on an ^1ULTRAKILL!");
			attacker iprintlnBold("^1You ^7are on an ^1ULTRA KILL!");
			//playSoundOnPlayers("ultrakill");
			self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 who is on an ^1ultrakill!");
			self playlocalSound("ultrakill");
			attacker playlocalSound("ultrakill");
			}

		if(killcount == 5)
		
			{
			//iprintln(killcount);
			iprintln("^1" + attacker.name + "^7 is ^1DOMINATING!");
			attacker iprintlnBold("^1You ^7are ^1DOMINATING!");
			//playSoundOnPlayers("dominating");
			self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 who is ^1Dominating!");
			self playlocalSound("dominating");
			attacker playlocalSound("dominating");
			}
		
		if(killcount == 6)
		
			{
			//iprintln(killcount);
			iprintln("^1" + attacker.name + "^7 is ^1GODLIKE!");
			attacker iprintlnBold("^1GODLIKE!");
			//playSoundOnPlayers("godlike");
			self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 who is ^1GODLIKE!");
			self playlocalSound("godlike");
			attacker playlocalSound("godlike");
			}

		if(killcount == 7)
		
			{
			//iprintln(killcount);
			iprintln("^1" + attacker.name + "^7 is ^1TAKING THE pee-pee!");
			attacker iprintlnBold("^1NOW YOUR TAKING THE pee-pee!");
			//playSoundOnPlayers("holyshit");
			self iprintlnBold("^1You ^7are killed by ^1" + attacker.name + "^7 who is ^1Taking the pee-pee!");
			self playlocalSound("holyshit");
			attacker playlocalSound("holyshit");
			}

		if(killcount == 8)
		
			{
			//iprintln(killcount);
			iprintln("^1Unreal Killing Spree | Coded by Nuke^ www.clancups.com");
			attacker iprintlnBold("^3Unreal Killing Spree | coded by Nuke [email=admin@aceclan.co.uk]admin@aceclan.co.uk[/email]!");
			playSoundOnPlayers("fatbody");
			}
}


playSoundOnPlayers(sound, team)
{
	players = getentarray("player", "classname");

	if(level.splitscreen)
	{	
		if(isdefined(players[0]))
			players[0] playLocalSound(sound);
	}
	else
	{
		if(isdefined(team))
		{
			for(i = 0; i < players.size; i++)
			{
				if((isdefined(players[i].pers["team"])) && (players[i].pers["team"] == team))
					players[i] playLocalSound(sound);
			}
		}
		else
		{
			for(i = 0; i < players.size; i++)
				players[i] playLocalSound(sound);
		}
	}
}
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 01:09 pm
btw: and im willing to make it myself, but i can only manage this if someone who knows what hes doing can help me with it...
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 01:18 pm
I suggest trying to get a grasp of basic scripting first.

There is an excelent "getting started" scripting tutorial in the CoD tutorial section. It explains some of the basics..
For the rest it's just being very precise and patient.. and being a bit smart and having some programming experience doesn't hurt either.
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 04:25 pm
well i was trying around and tryed something:

i saw the dm.gsc used was CoD2, so i took the original dm.gsc from a main pk3 and entered under
Quote:
// If the player was killed by a head shot, let players know it was a head shot kill
if(sHitLoc == "head" && sMeansOfDeath != "MOD_MELEE")
sMeansOfDeath = "MOD_HEAD_SHOT";


i pasted
Quote:
thread maps\mp\gametypes\_shmod::Messages(sMeansOfDeath, attacker);


and put the dm.gsc into the pk3.. so i start the server and i get script error:

Quote:
******* script compile error *******
unknown function: (file 'maps\mp\gametypes\dm.gsc', line 610)
maps\mp\gametypes\_teams::loadout();

*
************************************


then i deleted that line, but when i started then the mod worked! BUT all of my awe mod and team loadout was f*cked..
this is as far as i know scripting.. im really desparate now
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 04:35 pm
theres a nice snpr (sniper) script that tell you and the victim who shot them, were, how far, how much damage and with wat weapon

heres the main part if it (think is can work, but i dunno)
very long btw

Code:

damageInfo( eVictim, eAttacker, eInflictor, iDamage, sWeapon, sMeansOfDeath, sHitLoc )
{

	if( !getCvarInt( "snpr_damageInfo" ) || ( getCvarInt( "snpr_damageInfo" ) == 2 && iDamage < eVictim.health ) )  return;

	if( isPlayer( eAttacker ) && eVictim == eAttacker )
	{
		switch( sMeansOfDeath )
		{
			case "MOD_CRUSH_JEEP":
			case "MOD_CRUSH_TANK":
				sVitimMOA = "Crushed";
				break;
			case "MOD_GRENADE_SPLASH":
			case "MOD_PROJECTILE_SPLASH":
			case "MOD_EXPLOSIVE":
			case "MOD_PROJECTILE":
			case "MOD_GRENADE":
				sVictimMOA = "Blew Up";
				break;
			case "MOD_RIFLE_BULLET":
			case "MOD_PISTOL_BULLET":
				sVictimMOA = "Shot";
				break;
			case "MOD_MELEE":
				sVictimMOA = "^5SMACKED^7";
				break;
			case "MOD_FLAME":
				sVictimMOA = "^1BBQ'd^7";
				break;
			case "MOD_ARTILLERY":
			case "MOD_ARTILLERY_SPLASH":
				if( iDamage > eVictim.health )  sVictimMOA = "^2SPLATED^7";
				else				sVictimMOA = "^2Bombed^7";
				break;
			default:
				sVictimMOA = "damaged";
				break;
		}

		sVictimInfo = "You " + sVictimMOA + "^7 ^1Yourself^7, ^1-" + iDamage + "^7";
	}
	else if ( isPlayer( eAttacker ) )
	{
		if( eAttacker.pers["team"] != eVictim.pers["team"] || getCvar( "g_gametype" ) == "dm" )
		{
			sHit_Loc = getHitLoc( sHitLoc, sMeansOfDeath );
			sRange = "from ^2" + getRange( eVictim, eAttacker ) + "^7 yards";

			switch( sMeansOfDeath )
			{
				case "MOD_CRUSH_TANK":
				case "MOD_CRUSH_JEEP":
					sVictimMOA = "Were CRUSHED";
					sAttackerMOA = "CRUSHED";
					sHitLoc = "";
					break;
				case "MOD_GRENADE_SPLASH":
				case "MOD_PROJECTILE_SPLASH":
				case "MOD_EXPLOSIVE":
				case "MOD_PROJECTILE":
				case "MOD_GRENADE":
					sVictimMOA = "^1Were Blown Up";
					sAttackerMOA = "Blew Up";
					sHitLoc = "";
					break;
				case "MOD_RIFLE_BULLET":
				case "MOD_PISTOL_BULLET":
					if( maps\mp\_isWeaponType::main( "turret", sWeapon ) )
					{
						sVictimMOA = "Were Cut In ^1Half";
						sAttackerMOA = "^1Sliced ^7& ^1Diced";
					}
					else
					{
						sVictimMOA= "Were ^1Shot";
						sAttackerMOA = "^1Shot";
					}
					break;
				case "MOD_MELEE":
					sVictimMOA = "Were ^5BASHED^7";
					sAttackerMOA = "^5BASHED^7";
					sRange = "";
					break;
				case "MOD_FLAME":
					sVictimMOA = "Were ^1BBQ'd^7";
					sAttackerMOA = "^1MADE TOAST OUT OF^7";
					sHitLoc = "";
					break;
				case "MOD_ARITLLERY":
				case "MOD_ARTILLERY_SPLASH":
					if( eVictim.health )
					{
						sVictimMOA = "were ^2SPLATED^7";
						sAttackerMOA = "^2OBILTERATED^7";
					}
					else
					{
						sVictimMOA = "Were ^2BOMBED^7";
						sAttackerMOA = "^2BOMBED^7";
					}
					sHitLoc = "";
					break;
				default:
					sVictimMOA = "^8Was " + sMeansOfDeath + " By^7";
					sAttackerMOA = 	"^8" + sMeansOfDeath + "^7";
					break;
			}

			sVictimInfo = "You " + sVictimMOA + "^7 " + sHit_Loc + "^7 by " + eAttacker.name + "^7 " + sRange + "^7, ^1You Took " + iDamage + " Damage^7";

			sAttackerInfo = "You " + sAttackerMOA + "^7 " + eVictim.name + "^7 " + sHit_Loc + "^7 " + sRange + "^7, ^1You Inflicted " + iDamage + " Damage^7";
		}
		else if( getCvarInt( "scr_friendlyfire" ) > 0 )
		{
			sVictimInfo = "You are being attacked by your ^1TEAMMATE^7 " + eAttacker.name + "^7";
			sAttackerInfo = "You are attacking your ^1TEAMMATE^7 " + eVictim.name + "^7";
		}
	}
	else
	{
		switch( sMeansOfDeath )
		{
			case "MOD_CRUSH_JEEP":
			case "MOD_CRUSH_TANK":
				sVictimMOA = "Were ^1CRUSHED";
				break;
			case "MOD_GRENADE_SPLASH":
			case "MOD_PROJECTILE_SPLASH":
			case "MOD_EXPLOSIVE":
			case "MOD_PROJECTILE":
			case "MOD_GRENADE":
				sVictimMOA = "Were Blown Up By The ^4World^7";
				break;
			case "MOD_FALLING":
				sVictimMOA = "Fell Down... ^1HAHA";
				break;
			case "MOD_TRIGGER_HURT":
				sVictimMOA = "Hurt By The ^4World^7";
				break;
			case "MOD_FLAME":
				sVictimMOA = "Was ^1BBQ'd^7";
				break;
			case "MOD_ARTILLERY":
			case "MOD_ARTILLERY_SPLASH":
				if( iDamage > eVictim.health )  sVictimMOA = "Were ^2SPLATED^7";
				else				sVictimMOA = "Were ^2Bombed^7";
				break;
			default:
				sVictimMOA = "^8" + sMeansOfDeath + "^7";
				break;
		}

		sVictimInfo = "You " + sVictimMOA + "^7, ^1-" + iDamage + "^7";
	}

	if( isDefined( sVictimInfo ) )
	{ println( eVictim, sVictimInfo ); eVictim iprintln( sVictimInfo ); }

	if( isPlayer( eAttacker ) && eAttacker != eVictim && isDefined( sAttackerInfo ) )
	{ println( eAttacker, sVictimInfo ); eAttacker iprintln( sAttackerInfo ); }

	if( getCvarInt( "snpr_debugDamages" ) == 2  && isPlayer( eAttacker ) && eAttacker != eVictim )
	{
		eVictim iprintln( eVictim.name + "^7 --> " + eAttacker.name + "^7 --> " + sHitLoc + " --> " + sMeansOfDeath + " --> " + sWeapon );
		eAttacker iprintln( eVictim.name + "^7 --> " + eAttacker.name + "^7 --> " + sHitLoc + " --> " + sMeansOfDeath + " --> " + sWeapon );
		if( isDefined( sAttackerInfo ) )
		{ eVictim iprintln( sAttackerInfo ); }
		if( isDefined( sVictimInfo ) )
		{ eAttacker iprintln( sVictimInfo ); }
	}
}
getHitLoc( sHitLoc, sMeansOfDeath )
{
	switch( sHitLoc )
	{
		case "left_foot":
			sResult = "in the ^0left foot^7";
			break;
		case "right_foot":
			sResult = "in the ^0right foot^7";
			break;
		case "left_leg_lower":
			sResult = "in the ^0left shin^7";
			break;
		case "right_leg_lower":
			sResult = "in the ^0right shin^7";
			break;
		case "left_leg_upper":
			sResult = "in the ^0left thigh^7";
			break;
		case "right_leg_upper":
			sResult = "in the ^0right thigh^7";
			break;
		case "torso_lower":
			sResult = "in the ^0gut^7";
			break;
		case "torso_upper":
			sResult = "in the ^0chest^7";
			break;
		case "left_hand":
			sResult = "in the ^0left hand^7";
			break;
		case "right_hand":
			sResult = "in the ^0right hand^7";
			break;
		case "left_arm_lower":
			sResult = "in the ^0left forearm^7";
			break;
		case "right_arm_lower":
			sResult = "in the ^0right ^4forearm^7";
			break;
		case "left_arm_upper":
			sResult = "in the ^0upper left arm^7";
			break;
		case "right_arm_upper":
			sResult = "in the ^0upper right arm^7";
			break;
		case "neck":
			sResult = "in the ^0neck^7";
			break;
		case "head": case "helmut":
			sResult = "in the ^1head^7";
			break;
		default:
			//if( sMeansOfDeath == "MOD_FALLING" )
			//{ sResult = "by a ^4sudden drop^7"; }
			//else
			//{ sResult = "by an ^1explosion^7"; }
			sResult = "";
			break;
	}

	return sResult;
}

getRange( eVictim, eAttacker )
{
	if ( !isDefined( eVictim ) )
	{ return -1; }
	else if ( !isDefined( eAttacker ) )
	{ return -2; }
	else
	{
		iResult = distance( eVictim.origin, eAttacker.origin );
		iResult = (int) ( iResult * 0.02778 );
	}
	return iResult;
}
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 06:26 pm
ok im trying another mod because the other simply wont work.. i use this script atm

my dm.gsc atm
Code:
/*
	Deathmatch
	Objective: 	Score points by eliminating other players
	Map ends:	When one player reaches the score limit, or time limit is reached
	Respawning:	No wait / Away from other players

	Level requirements
	------------------
		Spawnpoints:
			classname		mp_deathmatch_spawn
			All players spawn from these. The spawnpoint chosen is dependent on the current locations of enemies at the time of spawn.
			Players generally spawn away from enemies.

		Spectator Spawnpoints:
			classname		mp_deathmatch_intermission
			Spectators spawn from these and intermission is viewed from these positions.
			Atleast one is required, any more and they are randomly chosen between.

	Level script requirements
	-------------------------
		Team Definitions:
			game["allies"] = "american";
			game["axis"] = "german";
			Because Deathmatch doesn't have teams with regard to gameplay or scoring, this effectively sets the available weapons.
	
		If using minefields or exploders:
			maps\mp\_load::main();
		
	Optional level script settings
	------------------------------
		Soldier Type and Variation:
			game["american_soldiertype"] = "airborne";
			game["american_soldiervariation"] = "normal";
			game["german_soldiertype"] = "wehrmacht";
			game["german_soldiervariation"] = "normal";
			This sets what models are used for each nationality on a particular map.
			
			Valid settings:
				american_soldiertype		airborne
				american_soldiervariation	normal, winter
				
				british_soldiertype		airborne, commando
				british_soldiervariation	normal, winter
				
				russian_soldiertype		conscript, veteran
				russian_soldiervariation	normal, winter
				
				german_soldiertype		waffen, wehrmacht, fallschirmjagercamo, fallschirmjagergrey, kriegsmarine
				german_soldiervariation		normal, winter

		Layout Image:
			game["layoutimage"] = "yourlevelname";
			This sets the image that is displayed when players use the "View Map" button in game.
			Create an overhead image of your map and name it "hud@layout_yourlevelname".
			Then move it to main\levelshots\layouts. This is generally done by taking a screenshot in the game.
			Use the outsideMapEnts console command to keep models such as trees from vanishing when noclipping outside of the map.
*/

/*QUAKED mp_deathmatch_spawn (1.0 0.5 0.0) (-16 -16 0) (16 16 72)
Players spawn away from enemies at one of these positions.
*/

/*QUAKED mp_deathmatch_intermission (1.0 0.0 1.0) (-16 -16 -16) (16 16 16)
Intermission is randomly viewed from one of these positions.
Spectators spawn randomly at one of these positions.
*/

main()
{
	spawnpointname = "mp_deathmatch_spawn";
	spawnpoints = getentarray(spawnpointname, "classname");
	
	if(!spawnpoints.size)
	{
		maps\mp\gametypes\_callbacksetup::AbortLevel();
		return;
	}

	for(i = 0; i < spawnpoints.size; i++)
		spawnpoints[i] placeSpawnpoint();

	level.callbackStartGameType = ::Callback_StartGameType;
	level.callbackPlayerConnect = ::Callback_PlayerConnect;
	level.callbackPlayerDisconnect = ::Callback_PlayerDisconnect;
	level.callbackPlayerDamage = ::Callback_PlayerDamage;
	level.callbackPlayerKilled = ::Callback_PlayerKilled;

	maps\mp\gametypes\_callbacksetup::SetupCallbacks();

	allowed[0] = "dm";
	maps\mp\gametypes\_gameobjects::main(allowed);
	
	if(getCvar("scr_dm_timelimit") == "")		// Time limit per map
		setCvar("scr_dm_timelimit", "30");
	else if(getCvarFloat("scr_dm_timelimit") > 1440)
		setCvar("scr_dm_timelimit", "1440");
	level.timelimit = getCvarFloat("scr_dm_timelimit");
	setCvar("ui_dm_timelimit", level.timelimit);
	makeCvarServerInfo("ui_dm_timelimit", "30");

	if(getCvar("scr_dm_scorelimit") == "")		// Score limit per map
		setCvar("scr_dm_scorelimit", "50");
	level.scorelimit = getCvarInt("scr_dm_scorelimit");
	setCvar("ui_dm_scorelimit", level.scorelimit);
	makeCvarServerInfo("ui_dm_scorelimit", "50");

	if(getCvar("scr_forcerespawn") == "")		// Force respawning
		setCvar("scr_forcerespawn", "0");

////// Added by AWE ////	
	if(getCvar("scr_drophealth") == "")		// Free look spectator
		setCvar("scr_drophealth", "1");
////////////////////////

	killcam = getCvar("scr_killcam");
	if(killcam == "")				// Kill cam
		killcam = "1";
	setCvar("scr_killcam", killcam, true);
	level.killcam = getCvarInt("scr_killcam");
	
	if(!isDefined(game["state"]))
		game["state"] = "playing";

	level.QuickMessageToAll = true;
	level.mapended = false;
	level.healthqueue = [];
	level.healthqueuecurrent = 0;
	
	if(level.killcam >= 1)
		setarchive(true);
}

Callback_StartGameType()
{

////////// Added by AWE ///////////////
	maps\mp\gametypes\_awe::Callback_StartGameType();
///////////////////////////////////////

	// defaults if not defined in level script
	if(!isDefined(game["allies"]))
		game["allies"] = "american";
	if(!isDefined(game["axis"]))
		game["axis"] = "german";

	if(!isDefined(game["layoutimage"]))
		game["layoutimage"] = "default";
	layoutname = "levelshots/layouts/hud@layout_" + game["layoutimage"];
	precacheShader(layoutname);
	setCvar("scr_layoutimage", layoutname);
	makeCvarServerInfo("scr_layoutimage", "");

	// server cvar overrides
	if(getCvar("scr_allies") != "")
		game["allies"] = getCvar("scr_allies");
	if(getCvar("scr_axis") != "")
		game["axis"] = getCvar("scr_axis");

	game["menu_serverinfo"] = "serverinfo_" + getCvar("g_gametype");
	game["menu_team"] = "team_" + game["allies"] + game["axis"];
	game["menu_weapon_allies"] = "weapon_" + game["allies"];
	game["menu_weapon_axis"] = "weapon_" + game["axis"];
	game["menu_viewmap"] = "viewmap";
	game["menu_callvote"] = "callvote";
	game["menu_quickcommands"] = "quickcommands";
	game["menu_quickstatements"] = "quickstatements";
	game["menu_quickresponses"] = "quickresponses";

	precacheString(&"MPSCRIPT_PRESS_ACTIVATE_TO_RESPAWN");
	precacheString(&"MPSCRIPT_KILLCAM");

	precacheMenu(game["menu_serverinfo"]);
	precacheMenu(game["menu_team"]);
	precacheMenu(game["menu_weapon_allies"]);
	precacheMenu(game["menu_weapon_axis"]);
	precacheMenu(game["menu_viewmap"]);
	precacheMenu(game["menu_callvote"]);
	precacheMenu(game["menu_quickcommands"]);
	precacheMenu(game["menu_quickstatements"]);
	precacheMenu(game["menu_quickresponses"]);

	precacheShader("black");
	precacheShader("hudScoreboard_mp");
	precacheShader("gfx/hud/hud@mpflag_none.tga");
	precacheShader("gfx/hud/hud@mpflag_spectator.tga");
	precacheStatusIcon("gfx/hud/hud@status_dead.tga");
	precacheStatusIcon("gfx/hud/hud@status_connecting.tga");
	precacheItem("item_health");

	maps\mp\gametypes\_teams::modeltype();
	maps\mp\gametypes\_teams::precache();
	maps\mp\gametypes\_teams::initGlobalCvars();
	maps\mp\gametypes\_teams::initWeaponCvars();
	maps\mp\gametypes\_teams::restrictPlacedWeapons();
	thread maps\mp\gametypes\_teams::updateGlobalCvars();
	thread maps\mp\gametypes\_teams::updateWeaponCvars();
	thread maps\mp\gametypes\_damagefeedback::init();

	setClientNameMode("auto_change");

	thread startGame();
//	thread addBotClients(); // For development testing
	thread updateGametypeCvars();
}

Callback_PlayerConnect()
{
	self.statusicon = "gfx/hud/hud@status_connecting.tga";
	self waittill("begin");
	self.statusicon = "";

	iprintln(&"MPSCRIPT_CONNECTED", self);

	lpselfnum = self getEntityNumber();
	lpselfguid = self getGuid();
	logPrint("J;" + lpselfguid + ";" + lpselfnum + ";" + self.name + "\n");
	
	if(game["state"] == "intermission")
	{
		spawnIntermission();
		return;
	}

	level endon("intermission");

	if(isDefined(self.pers["team"]) && self.pers["team"] != "spectator")
	{
		self setClientCvar("ui_weapontab", "1");
		self.sessionteam = "none";

		if(self.pers["team"] == "allies")
			self setClientCvar("g_scriptMainMenu", game["menu_weapon_allies"]);
		else
			self setClientCvar("g_scriptMainMenu", game["menu_weapon_axis"]);

		if(isDefined(self.pers["weapon"]))
			spawnPlayer();
		else
		{
			spawnSpectator();

			if(self.pers["team"] == "allies")
				self openMenu(game["menu_weapon_allies"]);
			else
				self openMenu(game["menu_weapon_axis"]);
		}
	}
	else
	{
		self setClientCvar("g_scriptMainMenu", game["menu_team"]);
		self setClientCvar("ui_weapontab", "0");

		if(!isDefined(self.pers["skipserverinfo"]))
			self openMenu(game["menu_serverinfo"]);

		self.pers["team"] = "spectator";
		self.sessionteam = "spectator";

		spawnSpectator();
	}

	for(;;)
	{
		self waittill("menuresponse", menu, response);

		if(menu == game["menu_serverinfo"] && response == "close")
		{
			self.pers["skipserverinfo"] = true;
			self openMenu(game["menu_team"]);
		}

		if(response == "open" || response == "close")
			continue;

		if(menu == game["menu_team"])
		{
			switch(response)
			{
			case "allies":
			case "axis":
			case "autoassign":
				if(response == "autoassign")
				{
					teams[0] = "allies";
					teams[1] = "axis";
					response = teams[randomInt(2)];
				}

				if(response == self.pers["team"] && self.sessionstate == "playing")
					break;

				if(response != self.pers["team"] && self.sessionstate == "playing")
					self suicide();

				self notify("end_respawn");

				self.pers["team"] = response;
				self.pers["weapon"] = undefined;
				self.pers["savedmodel"] = undefined;

				self setClientCvar("ui_weapontab", "1");

				if(self.pers["team"] == "allies")
				{
					self setClientCvar("g_scriptMainMenu", game["menu_weapon_allies"]);
					self openMenu(game["menu_weapon_allies"]);
				}
				else
				{
					self setClientCvar("g_scriptMainMenu", game["menu_weapon_axis"]);
					self openMenu(game["menu_weapon_axis"]);
				}
				break;

			case "spectator":
				if(self.pers["team"] != "spectator")
				{
					self.pers["team"] = "spectator";
					self.pers["weapon"] = undefined;
					self.pers["savedmodel"] = undefined;
					
					self.sessionteam = "spectator";
					self setClientCvar("g_scriptMainMenu", game["menu_team"]);
					self setClientCvar("ui_weapontab", "0");
					spawnSpectator();
				}
				break;

			case "weapon":
				if(self.pers["team"] == "allies")
					self openMenu(game["menu_weapon_allies"]);
				else if(self.pers["team"] == "axis")
					self openMenu(game["menu_weapon_axis"]);
				break;

			case "viewmap":
				self openMenu(game["menu_viewmap"]);
				break;

			case "callvote":
				self openMenu(game["menu_callvote"]);
				break;
			}
		}
		else if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"])
		{
			if(response == "team")
			{
				self openMenu(game["menu_team"]);
				continue;
			}
			else if(response == "viewmap")
			{
				self openMenu(game["menu_viewmap"]);
				continue;
			}
			else if(response == "callvote")
			{
				self openMenu(game["menu_callvote"]);
				continue;
			}

			if(!isDefined(self.pers["team"]) || (self.pers["team"] != "allies" && self.pers["team"] != "axis"))
				continue;
				
			weapon = self maps\mp\gametypes\_teams::restrict(response);

			if(weapon == "restricted")
			{
				self openMenu(menu);
				continue;
			}

			if(isDefined(self.pers["weapon"]) && self.pers["weapon"] == weapon)
				continue;

			if(!isDefined(self.pers["weapon"]))
			{
				self.pers["weapon"] = weapon;
				spawnPlayer();
			}
			else
			{
				self.pers["weapon"] = weapon;
				
				weaponname = maps\mp\gametypes\_teams::getWeaponName(self.pers["weapon"]);
				
				if(maps\mp\gametypes\_teams::useAn(self.pers["weapon"]))
					self iprintln(&"MPSCRIPT_YOU_WILL_RESPAWN_WITH_AN", weaponname);
				else
					self iprintln(&"MPSCRIPT_YOU_WILL_RESPAWN_WITH_A", weaponname);
			}
		}
		else if(menu == game["menu_viewmap"])
		{
			switch(response)
			{
			case "team":
				self openMenu(game["menu_team"]);
				break;

			case "weapon":
				if(self.pers["team"] == "allies")
					self openMenu(game["menu_weapon_allies"]);
				else if(self.pers["team"] == "axis")
					self openMenu(game["menu_weapon_axis"]);
				break;

			case "callvote":
				self openMenu(game["menu_callvote"]);
				break;
			}
		}
		else if(menu == game["menu_callvote"])
		{
			switch(response)
			{
			case "team":
				self openMenu(game["menu_team"]);
				break;

			case "weapon":
				if(self.pers["team"] == "allies")
					self openMenu(game["menu_weapon_allies"]);
				else if(self.pers["team"] == "axis")
					self openMenu(game["menu_weapon_axis"]);
				break;

			case "viewmap":
				self openMenu(game["menu_viewmap"]);
				break;
			}
		}
		else if(menu == game["menu_quickcommands"])
			maps\mp\gametypes\_teams::quickcommands(response);
		else if(menu == game["menu_quickstatements"])
			maps\mp\gametypes\_teams::quickstatements(response);
		else if(menu == game["menu_quickresponses"])
			maps\mp\gametypes\_teams::quickresponses(response);
	}
}

Callback_PlayerDisconnect()
{

///// Added by AWE ////////
	self maps\mp\gametypes\_awe::PlayerDisconnect();
///////////////////////////

	iprintln(&"MPSCRIPT_DISCONNECTED", self);

	lpselfnum = self getEntityNumber();
	lpselfguid = self getGuid();
	logPrint("Q;" + lpselfguid + ";" + lpselfnum + ";" + self.name + "\n");
}

Callback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc)
{
	if(self.sessionteam == "spectator")
		return;

	// Don't do knockback if the damage direction was not specified
	if(!isDefined(vDir))
		iDFlags |= level.iDFLAGS_NO_KNOCKBACK;

	// Make sure at least one point of damage is done
	if(iDamage < 1)
		iDamage = 1;

	// Do debug print if it's enabled
	if(getCvarInt("g_debugDamage"))
	{
		println("client:" + self getEntityNumber() + " health:" + self.health +
			" damage:" + iDamage + " hitLoc:" + sHitLoc);
	}

	// Apply the damage to the player
	self finishPlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc);

////////////// Added by AWE //////////////////
	self maps\mp\gametypes\_awe::DoPlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc);
//////////////////////////////////////////////

	if(self.sessionstate != "dead")
	{
		lpselfnum = self getEntityNumber();
		lpselfname = self.name;
		lpselfteam = self.pers["team"];
		lpselfGuid = self getGuid();
		lpattackerteam = "";

		if(isPlayer(eAttacker))
		{
			lpattacknum = eAttacker getEntityNumber();
			lpattackGuid = eAttacker getGuid();
			lpattackname = eAttacker.name;
			lpattackerteam = eAttacker.pers["team"];
		}
		else
		{
			lpattacknum = -1;
			lpattackGuid = "";
			lpattackname = "";
			lpattackerteam = "world";
		}

		logPrint("D;" + lpselfGuid + ";" + lpselfnum + ";" + lpselfteam + ";" + lpselfname + ";" + lpattackGuid + ";" + lpattacknum + ";" + lpattackerteam + ";" + lpattackname + ";" + sWeapon + ";" + iDamage + ";" + sMeansOfDeath + ";" + sHitLoc + "\n");
	}
}

Callback_PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc)
{
	self endon("spawned");

	if(self.sessionteam == "spectator")
		return;

/////////// Added by AWE ///////////
	self thread maps\mp\gametypes\_awe::PlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc);
////////////////////////////////////

	// If the player was killed by a head shot, let players know it was a head shot kill
	if(sHitLoc == "head" && sMeansOfDeath != "MOD_MELEE")
		sMeansOfDeath = "MOD_HEAD_SHOT";
	 if(sMeansOfDeath == "MOD_HEAD_SHOT")
	{     
				attacker maps\mp\gametypes\_damagefeedback::headshotsound();
		    self maps\mp\gametypes\_damagefeedback::headshotsound();
  }
        	  if(sMeansOfDeath == "MOD_MELEE")
	{
        attacker maps\mp\gametypes\_damagefeedback::brutalitysound();
		    self maps\mp\gametypes\_damagefeedback::brutalitysound();
	}
		if(sMeansOfDeath == "MOD_GRENADE_SPLASH")
	{
       	attacker maps\mp\gametypes\_damagefeedback::fatalitysound();
		    self maps\mp\gametypes\_damagefeedback::fatalitysound();
	}
    if(sMeansOfDeath == "MOD_SUICIDE")
  {
      self maps\mp\gametypes\_damagefeedback::humiliationsound();    
  }
  self thread Check_for_EndofRampage(self);
     { 
      hitlocation = ""; 

      if(sHitLoc == "head") 
         hitlocation = "Head "; 
      if(sHitLoc == "helmet") 
         hitlocation = "Helmet "; 
      if(sHitLoc == "neck") 
         hitlocation = "Neck "; 
      if(sHitLoc == "torso_upper") 
         hitlocation = "Upper Torso "; 
      if(sHitLoc == "torso_lower") 
         hitlocation = "Lower Torso "; 
      if(sHitLoc == "right_arm_upper") 
         hitlocation = "Upper Right Arm "; 
      if(sHitLoc == "right_arm_lower") 
         hitlocation = "Lower Right Arm "; 
      if(sHitLoc == "right_hand") 
         hitlocation = "Right Hand "; 
      if(sHitLoc == "left_arm_upper") 
         hitlocation = "Upper Left Arm "; 
      if(sHitLoc == "left_arm_lower") 
         hitlocation = "Lower Left Arm "; 
      if(sHitLoc == "left_hand") 
         hitlocation = "Left Hand "; 
      if(sHitLoc == "right_leg_upper") 
         hitlocation = "Upper Right Leg "; 
      if(sHitLoc == "right_leg_lower") 
         hitlocation = "Lower Right Leg "; 
      if(sHitLoc == "right_foot") 
         hitlocation = "Right Foot "; 
      if(sHitLoc == "left_leg_upper") 
         hitlocation = "Upper Left Leg "; 
      if(sHitLoc == "left_leg_lower") 
         hitlocation = "Lower Left Leg "; 
      if(sHitLoc == "left_foot") 
         hitlocation = "Left Foot "; 
     
      distance = distance(Attacker.origin , self.origin); 
      meters = (int(distance * 0.254))/10; 
       
      attacker iprintln("^1" + hitlocation + " Shot ^7from a Distance of ^2" + meters + " ^7meters!"); 
      self iprintln("^1" + hitlocation + " Shot ^7from a Distance of ^2" + meters + " ^7meters!");
     }
	// send out an obituary message to all clients about the kill
////////// Removed by AWE ///////
//	obituary(self, attacker, sWeapon, sMeansOfDeath);
/////////////////////////////////

	self.sessionstate = "dead";
	self.statusicon = "gfx/hud/hud@status_dead.tga";
	self.deaths++;

	lpselfnum = self getEntityNumber();
	lpselfname = self.name;
	lpselfteam = "";
	lpselfguid = self getGuid();
	lpattackerteam = "";

	attackerNum = -1;
	if(isPlayer(attacker))
	{
		if(attacker == self) // killed himself
		{
			doKillcam = false;

			attacker.score--;
		}
		else
		{
			attackerNum = attacker getEntityNumber();
			doKillcam = true;

			attacker.score++;
			attacker checkScoreLimit();
		}

		lpattacknum = attacker getEntityNumber();
		lpattackguid = attacker getGuid();
		lpattackname = attacker.name;
	}
	else // If you weren't killed by a player, you were in the wrong place at the wrong time
	{
		doKillcam = false;

		self.score--;

		lpattacknum = -1;
		lpattackguid = "";
		lpattackname = "";
	}
	
	logPrint("K;" + lpselfguid + ";" + lpselfnum + ";" + lpselfteam + ";" + lpselfname + ";" + lpattackguid + ";" + lpattacknum + ";" + lpattackerteam + ";" + lpattackname + ";" + sWeapon + ";" + iDamage + ";" + sMeansOfDeath + ";" + sHitLoc + "\n");

	// Stop thread if map ended on this death
	if(level.mapended)
		return;
		
//	self updateDeathArray();

	// Make the player drop his weapon

///// Removed by AWE /////
//	self dropItem(self getcurrentweapon());
//////////////////////////

	// Make the player drop health
	self dropHealth();

///// Removed by AWE /////
//	body = self cloneplayer();
//////////////////////////

	delay = 2;	// Delay the player becoming a spectator till after he's done dying
	wait delay;	// ?? Also required for Callback_PlayerKilled to complete before respawn/killcam can execute
	
	if((getCvarInt("scr_killcam") <= 0) || (getCvarInt("scr_forcerespawn") > 0))
		doKillcam = false;
	
	if(doKillcam)
		self thread killcam(attackerNum, delay);
	else
		self thread respawn();
}

updateDeathArray()
{
	if(!isDefined(level.deatharray))
	{
		level.deatharray[0] = self.origin;
		level.deatharraycurrent = 1;
		return;
	}

	if(level.deatharraycurrent < 31)
		level.deatharray[level.deatharraycurrent] = self.origin;
	else
	{
		level.deatharray[0] = self.origin;
		level.deatharraycurrent = 1;
		return;
	}

	level.deatharraycurrent++;
}

spawnPlayer()
{
	self notify("spawned");
	self notify("end_respawn");

	resettimeout();

//	if(isDefined(self.shocked))
//	{
//		self stopShellshock();
//		self.shocked = undefined;
//	}

	self.sessionteam = "none";
	self.sessionstate = "playing";
	self.spectatorclient = -1;
	self.archivetime = 0;
		
	spawnpointname = "mp_deathmatch_spawn";
	spawnpoints = getentarray(spawnpointname, "classname");
	spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_DM(spawnpoints);

	if(isDefined(spawnpoint))
		self spawn(spawnpoint.origin, spawnpoint.angles);
	else
		maps\mp\_utility::error("NO " + spawnpointname + " SPAWNPOINTS IN MAP");

	self.statusicon = "";
	self.maxhealth = 100;
	self.health = self.maxhealth;

	if(!isDefined(self.pers["savedmodel"]))
		maps\mp\gametypes\_teams::model();
	else
		maps\mp\_utility::loadModel(self.pers["savedmodel"]);

	maps\mp\gametypes\_teams::givePistol();
	maps\mp\gametypes\_teams::giveGrenades(self.pers["weapon"]);

	self giveWeapon(self.pers["weapon"]);
	self giveMaxAmmo(self.pers["weapon"]);
	self setSpawnWeapon(self.pers["weapon"]);
	
	self setClientCvar("cg_objectiveText", &"DM_KILL_OTHER_PLAYERS");

////////////// Added by AWE /////////////////
	self maps\mp\gametypes\_awe::spawnPlayer();
/////////////////////////////////////////////
}

spawnSpectator(origin, angles)
{
	self notify("spawned");
	self notify("end_respawn");
	
	resettimeout();

//	if(isDefined(self.shocked))
//	{
//		self stopShellshock();
//		self.shocked = undefined;
//	}

	self.sessionstate = "spectator";
	self.spectatorclient = -1;
	self.archivetime = 0;

	if(self.pers["team"] == "spectator")
		self.statusicon = "";
	
	if(isDefined(origin) && isDefined(angles))
		self spawn(origin, angles);
	else
	{
		spawnpointname = "mp_deathmatch_intermission";
		spawnpoints = getentarray(spawnpointname, "classname");
		spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random(spawnpoints);

		if(isDefined(spawnpoint))
			self spawn(spawnpoint.origin, spawnpoint.angles);
		else
			maps\mp\_utility::error("NO " + spawnpointname + " SPAWNPOINTS IN MAP");
	}

	self setClientCvar("cg_objectiveText", &"DM_KILL_OTHER_PLAYERS");
}

spawnIntermission()
{
	self notify("spawned");
	self notify("end_respawn");
	
	resettimeout();

//	if(isDefined(self.shocked))
//	{
//		self stopShellshock();
//		self.shocked = undefined;
//	}

	self.sessionstate = "intermission";
	self.spectatorclient = -1;
	self.archivetime = 0;

	spawnpointname = "mp_deathmatch_intermission";
	spawnpoints = getentarray(spawnpointname, "classname");
	spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random(spawnpoints);

	if(isDefined(spawnpoint))
		self spawn(spawnpoint.origin, spawnpoint.angles);
	else
		maps\mp\_utility::error("NO " + spawnpointname + " SPAWNPOINTS IN MAP");
}

Check_for_Rampage()
{
name = self.name;
if (self.pers["kill_spree"] == 8)
{
wait 0.9;
	iprintln("^7"+ name +"^7 is ^3Dominating^7: with 8 kills in a row");
	self maps\mp\gametypes\_damagefeedback::dominatingsound();
}
else if (self.pers["kill_spree"] == 5)
{ 
wait 0.9;
	iprintln("^7"+ name +"^7 is on a ^3Rampage^7: with 5 kills in a row");
	self maps\mp\gametypes\_damagefeedback::rampagesound();
}
else if (self.pers["kill_spree"] == 3)
{
wait 0.9;
 	iprintln("^7"+ name +"^7 is on a ^3Killing Spree^7 with 3 kills in a row");
  self maps\mp\gametypes\_damagefeedback::killingspreesound();
}
else if (self.pers["kill_spree"] == 11)
{
wait 0.9;
 	iprintln("^7"+ name +"^7 is ^3Unstoppable^7: 11 kills in a row");
	self maps\mp\gametypes\_damagefeedback::unstoppablesound();
}
else if (self.pers["kill_spree"] == 30)
{
wait 0.9;
	iprintln("^7"+ name +"^7 is ^3Godlike^7: 30 kills in a row");
	self maps\mp\gametypes\_damagefeedback::godlikesound();
}
else if (self.pers["kill_spree"] == 20)
{
wait 0.9;
  	iprintln("^7"+ name +" ^3Wicked Sick^7: 20 kills in a row");
	self maps\mp\gametypes\_damagefeedback::wickedsicksound();	
}
else if (self.pers["kill_spree"] == 25)
{
wait 0.9;
 	iprintln("^7"+ name +"^7 : ^3HOLY poo-poo^7: 25 kills in a row");
	self maps\mp\gametypes\_damagefeedback::holyshitsound();	
}
else if (self.pers["kill_spree"] == 15)
{
wait 0.9;
 	iprintln("^7"+ name +"^7 is ^3Slaughtering^7: 15 kills in a row");
	self maps\mp\gametypes\_damagefeedback::slaughtersound();
}

}
///////////////////Killing Spree Messages and Sounds/////////////////////////////////
Check_for_EndofRampage(attacker)
{
if (self.pers["kill_spree"] == 3)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Killing Spree");
self maps\mp\gametypes\_damagefeedback::dohsound();
}
else if (self.pers["kill_spree"] == 4)
{
self maps\mp\gametypes\_damagefeedback::dohsound();
iprintln(attacker.name + " Has Ended " + self.name + "'s Killing Spree");
}
else if (self.pers["kill_spree"] == 5)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Rampage");
self maps\mp\gametypes\_damagefeedback::enditsound();
}
else if (self.pers["kill_spree"] == 6)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Rampage");
self maps\mp\gametypes\_damagefeedback::enditsound();
}
else if (self.pers["kill_spree"] == 7)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Rampage");
self maps\mp\gametypes\_damagefeedback::enditsound();
}
else if (self.pers["kill_spree"] == 8)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Domination");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 9)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Domination");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 10)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Domination");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 11)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Unstoppable Killing Spree");
self maps\mp\gametypes\_damagefeedback::killspree_endsound();
}
else if (self.pers["kill_spree"] == 12)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Unstoppable Killing Spree");
self maps\mp\gametypes\_damagefeedback::killspree_endsound();
}
else if (self.pers["kill_spree"] == 13)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Unstoppable Killing Spree");
self maps\mp\gametypes\_damagefeedback::killspree_endsound();
}
else if (self.pers["kill_spree"] == 14)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Unstoppable Killing Spree");
self maps\mp\gametypes\_damagefeedback::killspree_endsound();
}
else if (self.pers["kill_spree"] == 15)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Slaughter Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 16)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Slaughter Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 17)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Slaughter Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 18)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Slaughter Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 19)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Slaughter Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 20)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Wicked Sick Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 21)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Wicked Sick Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 22)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Wicked Sick Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 23)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Wicked Sick Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 24)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Wicked Sick Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 25)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Holy poo-poo Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 26)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Holy poo-poo Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 27)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Holy poo-poo Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 28)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Holy poo-poo Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 29)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s Holy poo-poo Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 30)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 31)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 32)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 33)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 34)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
else if (self.pers["kill_spree"] == 35)
{
iprintln(attacker.name + " Has Ended " + self.name + "'s God Like Killing Spree");
self maps\mp\gametypes\_damagefeedback::hallelujah();
}
}

respawn()
{
	if(!isDefined(self.pers["weapon"]))
		return;

	self endon("end_respawn");

	if(getCvarInt("scr_forcerespawn") > 0)
	{
		self thread waitForceRespawnTime();
		self thread waitRespawnButton();
		self waittill("respawn");
	}
	else
	{
		self thread waitRespawnButton();
		self waittill("respawn");
	}

	self thread spawnPlayer();
}

waitForceRespawnTime()
{
	self endon("end_respawn");
	self endon("respawn");

	wait getCvarInt("scr_forcerespawn");
	self notify("respawn");
}

waitRespawnButton()
{
	self endon("end_respawn");
	self endon("respawn");

	wait 0; // Required or the "respawn" notify could happen before it's waittill has begun

	self.respawntext = newClientHudElem(self);
	self.respawntext.alignX = "center";
	self.respawntext.alignY = "middle";
	self.respawntext.x = 320;
	self.respawntext.y = 70;
	self.respawntext.archived = false;
	self.respawntext setText(&"MPSCRIPT_PRESS_ACTIVATE_TO_RESPAWN");

	thread removeRespawnText();
	thread waitRemoveRespawnText("end_respawn");
	thread waitRemoveRespawnText("respawn");

	while(self useButtonPressed() != true)
		wait .05;

	self notify("remove_respawntext");

	self notify("respawn");
}

removeRespawnText()
{
	self waittill("remove_respawntext");

	if(isDefined(self.respawntext))
		self.respawntext destroy();
}

waitRemoveRespawnText(message)
{
	self endon("remove_respawntext");

	self waittill(message);
	self notify("remove_respawntext");
}

killcam(attackerNum, delay)
{
	self endon("spawned");

//	previousorigin = self.origin;
//	previousangles = self.angles;

	// killcam
	if(attackerNum < 0)
		return;

	self.sessionstate = "spectator";
	self.spectatorclient = attackerNum;
	self.archivetime = delay + 7;
	
	// wait till the next server frame to allow code a chance to update archivetime if it needs trimming
	wait 0.05;

	if(self.archivetime <= delay)
	{
		self.spectatorclient = -1;
		self.archivetime = 0;
		self.sessionstate = "dead";
		
		self thread respawn();
		return;
	}

	if(!isDefined(self.kc_topbar))
	{
		self.kc_topbar = newClientHudElem(self);
		self.kc_topbar.archived = false;
		self.kc_topbar.x = 0;
		self.kc_topbar.y = 0;
		self.kc_topbar.alpha = 0.5;
		self.kc_topbar setShader("black", 640, 112);
	}

	if(!isDefined(self.kc_bottombar))
	{
		self.kc_bottombar = newClientHudElem(self);
		self.kc_bottombar.archived = false;
		self.kc_bottombar.x = 0;
		self.kc_bottombar.y = 368;
		self.kc_bottombar.alpha = 0.5;
		self.kc_bottombar setShader("black", 640, 112);
	}

	if(!isDefined(self.kc_title))
	{
		self.kc_title = newClientHudElem(self);
		self.kc_title.archived = false;
		self.kc_title.x = 320;
		self.kc_title.y = 40;
		self.kc_title.alignX = "center";
		self.kc_title.alignY = "middle";
		self.kc_title.sort = 1; // force to draw after the bars
		self.kc_title.fontScale = 3.5;
	}
	self.kc_title setText(&"MPSCRIPT_KILLCAM");

	if(!isDefined(self.kc_skiptext))
	{
		self.kc_skiptext = newClientHudElem(self);
		self.kc_skiptext.archived = false;
		self.kc_skiptext.x = 320;
		self.kc_skiptext.y = 70;
		self.kc_skiptext.alignX = "center";
		self.kc_skiptext.alignY = "middle";
		self.kc_skiptext.sort = 1; // force to draw after the bars
	}
	self.kc_skiptext setText(&"MPSCRIPT_PRESS_ACTIVATE_TO_RESPAWN");

	if(!isDefined(self.kc_timer))
	{
		self.kc_timer = newClientHudElem(self);
		self.kc_timer.archived = false;
		self.kc_timer.x = 320;
		self.kc_timer.y = 428;
		self.kc_timer.alignX = "center";
		self.kc_timer.alignY = "middle";
		self.kc_timer.fontScale = 3.5;
		self.kc_timer.sort = 1;
	}
	self.kc_timer setTenthsTimer(self.archivetime - delay);

	self thread spawnedKillcamCleanup();
	self thread waitSkipKillcamButton();
	self thread waitKillcamTime();
	self waittill("end_killcam");

	self removeKillcamElements();

	self.spectatorclient = -1;
	self.archivetime = 0;
	self.sessionstate = "dead";
	
	//self thread spawnSpectator(previousorigin + (0, 0, 60), previousangles);
	self thread respawn();
}

waitKillcamTime()
{
	self endon("end_killcam");

	wait(self.archivetime - 0.05);
	self notify("end_killcam");
}

waitSkipKillcamButton()
{
	self endon("end_killcam");

	while(self useButtonPressed())
		wait .05;

	while(!(self useButtonPressed()))
		wait .05;

	self notify("end_killcam");
}

removeKillcamElements()
{
	if(isDefined(self.kc_topbar))
		self.kc_topbar destroy();
	if(isDefined(self.kc_bottombar))
		self.kc_bottombar destroy();
	if(isDefined(self.kc_title))
		self.kc_title destroy();
	if(isDefined(self.kc_skiptext))
		self.kc_skiptext destroy();
	if(isDefined(self.kc_timer))
		self.kc_timer destroy();
}

spawnedKillcamCleanup()
{
	self endon("end_killcam");

	self waittill("spawned");
	self removeKillcamElements();
}

startGame()
{
	level.starttime = getTime();

	if(level.timelimit > 0)
	{
		level.clock = newHudElem();
		level.clock.x = 320;
		level.clock.y = 460;
		level.clock.alignX = "center";
		level.clock.alignY = "middle";
		level.clock.font = "bigfixed";
		level.clock setTimer(level.timelimit * 60);
	}

	for(;;)
	{
		checkTimeLimit();
		wait 1;
	}
}

endMap()
{

////// Added by AWE ///////////
	maps\mp\gametypes\_awe::endMap();
/////////////////////////////////

	game["state"] = "intermission";
	level notify("intermission");

	players = getentarray("player", "classname");
	for(i = 0; i < players.size; i++)
	{
		player = players[i];

		if(isDefined(player.pers["team"]) && player.pers["team"] == "spectator")
			continue;

		if(!isDefined(highscore))
		{
			highscore = player.score;
			playername = player;
			name = player.name;
			guid = player getGuid();
			continue;
		}

		if(player.score == highscore)
			tied = true;
		else if(player.score > highscore)
		{
			tied = false;
			highscore = player.score;
			playername = player;
			name = player.name;
			guid = player getGuid();
		}
	}

	players = getentarray("player", "classname");
	for(i = 0; i < players.size; i++)
	{
		player = players[i];

		player closeMenu();
		player setClientCvar("g_scriptMainMenu", "main");

		if(isDefined(tied) && tied == true)
			player setClientCvar("cg_objectiveText", &"MPSCRIPT_THE_GAME_IS_A_TIE");
		else if(isDefined(playername))
			player setClientCvar("cg_objectiveText", &"MPSCRIPT_WINS", playername);
		
		player spawnIntermission();
	}
	if(isDefined(name))
		logPrint("W;;" + guid + ";" + name + "\n");
	wait 10;
	exitLevel(false);
}

checkTimeLimit()
{
	if(level.timelimit <= 0)
		return;

	timepassed = (getTime() - level.starttime) / 1000;
	timepassed = timepassed / 60.0;

	if(timepassed < level.timelimit)
		return;

	if(level.mapended)
		return;
	level.mapended = true;

	iprintln(&"MPSCRIPT_TIME_LIMIT_REACHED");
	level thread endMap();
}

checkScoreLimit()
{
	if(level.scorelimit <= 0)
		return;

	if(self.score < level.scorelimit)
		return;

	if(level.mapended)
		return;
	level.mapended = true;

	iprintln(&"MPSCRIPT_SCORE_LIMIT_REACHED");
	level thread endMap();
}

updateGametypeCvars()
{
	for(;;)
	{
		timelimit = getCvarFloat("scr_dm_timelimit");
		if(level.timelimit != timelimit)
		{
			if(timelimit > 1440)
			{
				timelimit = 1440;
				setCvar("scr_dm_timelimit", "1440");
			}

			level.timelimit = timelimit;
			setCvar("ui_dm_timelimit", level.timelimit);
			level.starttime = getTime();

			if(level.timelimit > 0)
			{
				if(!isDefined(level.clock))
				{
					level.clock = newHudElem();
					level.clock.x = 320;
					level.clock.y = 440;
					level.clock.alignX = "center";
					level.clock.alignY = "middle";
					level.clock.font = "bigfixed";
				}
				level.clock setTimer(level.timelimit * 60);
			}
			else
			{
				if(isDefined(level.clock))
					level.clock destroy();
			}

			checkTimeLimit();
		}

		scorelimit = getCvarInt("scr_dm_scorelimit");
		if(level.scorelimit != scorelimit)
		{
			level.scorelimit = scorelimit;
			setCvar("ui_dm_scorelimit", level.scorelimit);

			players = getentarray("player", "classname");
			for(i = 0; i < players.size; i++)
				players[i] checkScoreLimit();
		}

		killcam = getCvarInt("scr_killcam");
		if (level.killcam != killcam)
		{
			level.killcam = getCvarInt("scr_killcam");
			if(level.killcam >= 1)
				setarchive(true);
			else
				setarchive(false);
		}
		
		wait 1;
	}
}

dropHealth()
{
//// Added by AWE ////
	if ( !getcvarint("scr_drophealth") )
		return;
		
	if(isdefined(self.awe_nohealthpack))
		return;
	self.awe_nohealthpack = true;
//////////////////////

	if(isDefined(level.healthqueue[level.healthqueuecurrent]))
		level.healthqueue[level.healthqueuecurrent] delete();
	
	level.healthqueue[level.healthqueuecurrent] = spawn("item_health", self.origin + (0, 0, 1));
	level.healthqueue[level.healthqueuecurrent].angles = (0, randomint(360), 0);

	level.healthqueuecurrent++;
	
	if(level.healthqueuecurrent >= 16)
		level.healthqueuecurrent = 0;
}

addBotClients()
{
	wait 5;

	for(;;)
	{
		if(getCvarInt("scr_numbots") > 0)
			break;
		wait 1;
	}

	iNumBots = getCvarInt("scr_numbots");
	for(i = 0; i < iNumBots; i++)
	{
		ent[i] = addtestclient();
		wait 0.5;

		if(isPlayer(ent[i]))
		{
			if(i & 1)
			{
				ent[i] notify("menuresponse", game["menu_team"], "axis");
				wait 0.5;
				ent[i] notify("menuresponse", game["menu_weapon_axis"], "kar98k_mp");
			}
			else
			{
				ent[i] notify("menuresponse", game["menu_team"], "allies");
				wait 0.5;
				ent[i] notify("menuresponse", game["menu_weapon_allies"], "springfield_mp");
			}
		}
	}
}


but when i start server and switch to DM i get this error

Quote:
******* script compile error *******
unknown (builtin) function 'int': (file 'maps\mp\gametypes\dm.gsc', line 584)
meters = (int(distance * 0.254))/10;

*
************************************
********************
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Feb. 11, 2007 06:40 pm
nvm...

Quote:
meters = (int(distance * 0.254))/10;


need to be

Quote:
meters = (distance * 0.254)/10;


btw y only edit for 10 min? kinda stupid since my last post is useless now
Share |
sauskopje
General Member
Since: Apr 14, 2005
Posts: 18
Last: Apr 20, 2007
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Monday, Feb. 12, 2007 05:45 am
nvm

Quote:


i converted this one to cod1
www.kaizen.nl.tt --> join server to check mod.

how i did it im not gonna tell since we are only here to "help" eachother [thumbs_up]

edited on Feb. 12, 2007 07:46 am by sauskopje
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

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

»