To Start of make a folder in your Call off Duty folder and name it firstmod
in side the firstmod folder make a folder called MAPS
in side the maps folder make one called MP
in side the maps folder make one called Gametypes
After you have done this and looks like just like images above you may go on to the next step.
Ok for this part you will want go to your Call of duty MAIN Folder and open pak9.pk3
this is a image of whats inside the pak9.pk3
Once inside pak9.pk3 click on maps then it will open a new folder. Click on mp and then it will open another folder click on gametypes once in gametypes folder find these 3 files
dm.gsc
dm.txt
_team.gsc
once you have found them drag them to your firstmod folder inside that gametypes folder.
Make sure looks like this.
After you have done this and it looks like the images above you may go on to the the next step.
Warning: this is the hardest part of the modding and for people who have never messed with C++ codeing or anything in that way shouldnt try to do this.
TIP: Go downlaod Notepad++ it help you keep track of what line your on and if you have errors in your line of code.
Download http://sourceforge.net/projects/notepad-plus/
On to the modding part. Ok in side the Gametypes folder make a gsc file called _test.gsc
so it looks like this.
Once thats done open the _test.gsc with notepad++
To Start off i'm going to show you a Basic easy code. put this in side _test.gsc
Code: Select all
main()
{
thread myfirstmod();
}
myfirstmod()
{
self iprintlnbold ("You just made your first Mod!"); // iprintlnbold will make it show up in the middle of the screen.
wait 0.5;
self iprintln ("Congrats you did it!"); // iprintln will show up as a side message on your left side and not in the middle of the screen.
}
inside dm.gsc push on your keybored ctrl + H and copy this Callback_PlayerConnect()and push enter. it will take you to that line. P.S if it wont let u edit then X out of dm.gsc and right click dm.gsc Uncheck read only and push apply then you can edit your dm.gsc.
On the player connect look for iprintln(&"MPSCRIPT_CONNECTED", self); add this code self maps\mp\gametypes\_test::main(); under iprintln(&"MPSCRIPT_CONNECTED", self); so looks just like how i have it.
Code: Select all
spawnPlayer()
{
self notify("spawned");
self notify("end_respawn");
self maps\mp\gametypes\_test::main();
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");
}
Go back to the first folder called Firstmod, Hlight maps folder right click it and go to Archive click it. it will open a page where says the name put zz_firstmod.pk3 once you have done push ok. it will make the files a pk3. once done take the maps folder and put it on your desktop and keep the pk3 in side firstmod.
then go in game click MODS find your mod folder called firstmod and click it it will X game then reload it again. once its loaded back go in to Create a server. uncheck inernet or lan server make it say none or no. once thats done disable punkbuster. before u click create server open console type /developer 1 that will help you find errors on what line you scewed up on if there is any .
Start your Server and Enjoy your First Call of Duty Mod.
If you need help my xfire is mox123456 and i can always help you.
If you can't understand my english i'm very sorry.
hope this helps.