Post: Make Your First Code [Part 1]
06-16-2012, 06:25 PM #1
KingcreekS
NOTHING IS IMPOSSIBL
(adsbygoogle = window.adsbygoogle || []).push({}); Ok this is the first part of tutorials i will be doing in mw2 section, i will teach how to make easy codes in this part , then in advanced parts , we will be learning how to make something difficult,so lets start.

I know that all of you want to make new things for cod games but is difficult to understand so:

·How to setup the text in your mod

You can use a lot of functions to setup the text in your mod/code but the most popular function is the "iPrintln" and "iPrintlnBold".

iPrintln:

The iPrintln will print in the LEFT-DOWN of your screen the text that you want to print like:

    self iPrintln("Tutorial Spawned");


iPrintlnBold:

The iPrintlnBold will print in the CENTER of your screen the text that you want like:

    self iPrintlnBold("Tutorial off");


·How to spawn models:

To spawn a model next to you , you use self.origin (That is where you spawn) , so it will setup like this:

    
tutorial = spawn("script_model",self.origin);
tutorial setModel("com_plasticcase_friendly");

That code will spawn a care package on where you spawn.
You can find a lot of models here:
You must login or register to view this content.

if you want to make your model solid you will use:

    
tutorial Solid();
tutorial CloneBrushmodelToScriptmodel(level.airDropCollision);



·How to loadFx and Sounds:

loadFx:

The LoadFx are all that you see that move , exploade and moree , in the game so if you want to make a care package play a wall explosion you will have to setup like this:

    
tutorial = loadfx("explosions/wall_explosion_pm_a");


Sounds:
The sounds are used for when the loadFx loads the sound play , so if we want to play a nuke sound you will have to do this:

    
tutorial playsound("nuke_explosion");


If we put all the parts of the tutorial it will be like this:
-Remember to make a thread name that you want

    
Tutorial()
{
self iPrintln("Tutorial Spawned");
tutorial = spawn("script_model",self.origin);
tutorial setModel("com_plasticcase_friendly");
tutorial Solid();
tutorial CloneBrushmodelToScriptmodel(level.airDropCollision);
tutorial = loadfx("explosions/wall_explosion_pm_a");
tutorial playsound("nuke_explosion");
self iPrintlnBold("Tutorial off");
}



I hope you enjoy making your first mod,
This Tutorial finish here , i hope you enjoyed ,
Thanks and peace.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to KingcreekS for this useful post:

FourzerotwoFAILS, Bichote, Jeremy, Ninja, Uk_ViiPeR, xKtF, Xx--AIDAN--xX
06-20-2012, 07:29 AM #11
LYFN
Banned
nice thread man very helpful to those hackers Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo