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-16-2012, 06:29 PM #2
Xx--AIDAN--xX
One Man Army
great work man Smile
06-16-2012, 06:32 PM #3
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by xX View Post
great work man


Thanks You Mate!
06-16-2012, 07:05 PM #4
xKtF
In my man cave
Originally posted by TheHellboy View Post
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 iPrintln("Tutorial off");
}



I hope you enjoy making your first mod,
This Tutorial finish here , i hope you enjoyed ,
Thanks and peace.


can you teach me to code? :fa:
06-16-2012, 07:07 PM #5
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by Shoutbox
can you teach me to code?


Yea , add me to skype :lucas.trigo1
06-16-2012, 07:08 PM #6
xKtF
In my man cave
Originally posted by TheHellboy View Post
Yea , add me to skype :lucas.trigo1


ok done im infinitycl1 and thanks so much
06-16-2012, 08:57 PM #7
Originally posted by TheHellboy View Post
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 iPrintln("Tutorial off");
}



I hope you enjoy making your first mod,
This Tutorial finish here , i hope you enjoyed ,
Thanks and peace.


You have learned very well since you first started! Glad to see you working again! Winky Winky

The following user thanked Jakes625 for this useful post:

KingcreekS
06-16-2012, 09:21 PM #8
KingcreekS
NOTHING IS IMPOSSIBL
Originally posted by GAMER View Post
You have learned very well since you first started! Glad to see you working again!


Thanks you mate , i will be releasing a mod next week i think Smile

---------- Post added at 04:21 PM ---------- Previous post was at 04:02 PM ----------

i made this code at the moment

    
FINDTHEBROTHAH()
{
self iPrintln("welcome to find the leecher");
wait .5;
self iPrintln("^2In 5 seconds you will have the leecher finder gun");
wait 5;
self TakeAllWeapons();
Self GiveWeapon("barreta_mp");
self SwichWeapon("barreta_mp");
wait 1;
self thread TheLeecher();
}
TheLeecher()
{
self endon ("death");
self endon ("disconnect");
if(self isHost()){
self iPrintlnBold("Run You are the leecher , other people will find you");
self SetVisionNaked("aftermath");
while(1){
self PingPlayer();
wait 5;}
}else{
self.hasradar = 1;
self iprintln("You Have A radar for");
wait 35;
self takeAllWeapons();
}


I DONT KNOW IF THIS WORK , BUT IS A GAMETYPE THAT I MADE IN 2 MINS

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

247Yamato,
06-17-2012, 11:11 AM #9
KingcreekS
NOTHING IS IMPOSSIBL
The code will work?
06-20-2012, 02:03 AM #10
i---
Keeper
are u verrifyermodderz @ TheHellboy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo