Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Ultimate Black Ops Modding
#1
Credits:
iHc James
edited by d0h!

Contents:

Fastfile Editing:
Getting Started
  • Editing Black Ops Files
Coding Basics for Black Ops
  • Functions
  • Comments
  • Endon Function
  • Wait
  • Calling Functions
  • Variables
  • If Statements
  • Select Case Statements
  • While Statements
  • For Statements
  • Final
HUD / Text
  • Working with _hud_util.gsc - Creation
  • - Creating a Bar
  • - Creating a Font String
  • Working with _hud_util.gsc - Modifying
  • - setPoint
  • - hideElem
  • - showElem
  • - destroyElem
  • - setWidth
  • - setHeight
  • - setSize
  • - setParent
  • - setText
  • Working with _hud_util.gsc - Examples
  • - Example Bar Creation
  • - Example Font String Creation
  • Working with _hud_message.gsc
  • - oldNotifyMessage
  • - hintMessage
  • - notifyMessage
  • - Other Text
  • - - iPrintIn
  • - - iPrintInBold
Pre Cache / Loading
  • Explanation
  • Example
DVARS
  • Using Dvars
  • - setDvar
  • - setClientDvar
  • Dvar Dump
Models
  • Basics
  • Script Model Properties
  • - Origin
  • - Angles
  • Script Model Functions
  • - Show
  • - Hide
  • - Solid
  • - Notsolid
  • Some Model Names
Sounds
  • Playing Sounds
  • - Functions to Play
  • - Examples
  • Some Sound Names
Weapons
  • giveWeapon
  • switchToWeapon
  • _disableWeapon
  • _enableWeapon
  • isWeaponEnabled
  • Some Weapon Names
Button Binding
  • OnPlayerConnect
  • Monitor Function
  • Waiters
  • Function Example
Small Mods
  • giveKillstreak
  • - Some Killstreak Names
Misc Functions
  • Coin Toss
  • isFlashed
  • wait
  • realWait
  • getGameLength
  • get_player_height
  • detatchAll
Some Variables
  • Self
  • - Name
  • - Health
  • Level
  • - Hostname
  • Examples
  • - Username Check
  • - Hostname Check
  • - Hostname -- Username Comparison
    Programs
    • ItsModsLoader
    • Notepad++
Other:
Zombie "use" Strings


Fastfile Editing:
Getting Started:

Editing Black Ops Files:

The Fastfile (.ff) contains numerous files, Think of it as a .zip / package.
The most popular file within a Fastfile is the GSC,
Idk wtf that stands for, Game Script Code or something :D?
Anyway on the list to the left of either of the programs will be the GSC's inside
they fille be formatted in folders.
The recommended GSC to edit is the _challenges.gsc which is located:
PHP Code:
maps/mp/_challenges.gsc 
so just click it and it will open.
Now you can edit the code.

Once you have that mastered, You are ready to continue :D

Coding Basics for Black Ops:


Functions:
Functions are a group of code, you can execute them from other function and even send them values
A function looks like this
PHP Code:
FunctionNameArgument1Argument2Argument3 )
{


FunctionName - This is the name of the function, you will use this to "call" it,
Calling a function means starting it.
Arguments - Argument is a value that can be passed to the function when calling it,
Arguments can be found between the () after the function name,
Each argument is seperated by commas. You don't have to use arguments,
a function without arguments would look like:
PHP Code:
FunctionName()
{


{ } - These are the symbols that will contain all the function code.

Comments:
Comments are a section within coding that will get ignored, to start a comment just type:
PHP Code:
// 
And everything after that would be ignored until the start of the next line.
You can also make group comments, group comments start with:
PHP Code:
/* 
and will only end when it gets to:
PHP Code:
*/ 
Here and example of how comments can be used:
PHP Code:
/* Here is a comment group 
Remember groups dont end after a new
line it will only end when it finds */

Function1()
{
    
//Heres a line comment

In most Black Ops GSC's you will find a function with the name onPlayerConnect,
It will look like this:
PHP Code:
onPlayerConnect()
{
    for(;;)
    {
        
level waittill"connected"player );
        
// The Code Differs Here
    
}

Anywhere under:
PHP Code:
level waittill"connected"player ); 
you can put your code, this will execute after you connect (game starts)
you are able to make a function that will execute whenever you spawn by:
Adding:
PHP Code:
player thread OnPlayerSpawn(); 
into the OnPlayerConnect function
So it will look like this:
PHP Code:
onPlayerConnect()
{
    for(;;)
    {
        
level waittill"connected"player );
        
// The Code Differs Here
        
player thread OnPlayerSpawn();
    }

Now you will need to create a function after this so start a new line and put:
PHP Code:
onPlayerSpawn()
{
    for(;;)
    {
        
self waittill"spawned_player" );
        
// Code Here gets executed on spawn
    
}

When making code withing OnPlayerConnect,
You will reference to yourself as "player"
But elsewhere you will reference yourself as "self"
At the top of GSC's is a function with the name init,
This is the initialization function, which will load/prepare stuff for the game,
such as caching models (loading models),
In the init function may notice:
PHP Code:
level thread onPlayerConnect(); 
This is what starts OnPlayerConnect

Endon Function:
To stop your functions messing up when you die / disconnect you can add either of these to the start of a function:
PHP Code:
self endon ("disconnect");
self endon ("death"); 

Wait:
Wait is a simple line of code that will wait however long you want like so:
PHP Code:
wait 1//Waits 1 second
wait 0.5;
wait 0.05

Calling Functions:
you can call a function like so:
PHP Code:
level thread functionName(); //Use this whenever
player thread functionName(); //Use this OnPlayerConnect
self thread functionName(); //Use this in your own functions 
Obviously dependant on where you are calling it from.
You can call functions from other GSC's by:
PHP Code:
self maps\mp\location\_gscname::Function(); 
Remember you dont put .gsc in this statement

Variables:
A variable is a stored value that you can set and get.
You can create a variable with a piece of simple code like this:
PHP Code:
String "This Is The Value";
Integer 5;
Boolean true;
Array = ( 
100200500 );
Array2 = ( "hello""hey""hi" ); 
String - Strings will hold a text value
Integer - Integers will only hold a numeric value
Boolean - Booleans are a true/false value
Array - Arrays is a group of values

If I create a variable within a function, I am unable to access it from another function:
PHP Code:
function1()
{
    
MyVariable = ( 00); // Sets the Varaible named MyVariable
}

function2()
{
    
self thread CallingAFunctionMyVariable ); // Tries to call a function with MyVariable as an argument
    //This wont work as it wont have access to the variable as its within another function.

So how do we get around this?
You can save Variables to a self, player or level.
by simply adding it like so:
PHP Code:
self.Variable "Hey";
level.Variable "Oh Hai Der";
player.Variable 1337
When setting a variable that you are able to access it anywhere.

If Statements:
An If statement if a group of code that will only execute if the check matches
heres the structure:
PHP Code:
if ( check )
{


The check will compare 2 values, like so
PHP Code:
if ( self.Variable == )
{
    
//This will only execute if self.Variable = 1

There are different operators that changes the comparison check
PHP Code:
==  // If its equal to
!=   // If its not equal to
<    // If its less than
<=  // If its less than or equal to
>    // If its more than
>=  // If its more than or equal to 
With If statements you can also have else which will execute if the check returns false
heres an example of an if with an else:
PHP Code:
if ( self.Variable == )
{
    
//This will only execute if self.Variable = 1
}
else
{
    
//This will only execute if self.Variable != 1


Select Case Statements:
The select statement is your #1 solution for not using lots of if statements,
for example:
PHP Code:
if ( self.Variable == )
{
    
// 0
}
if ( 
self.Variable == )
{
    
// 1
}
if ( 
self.Variable == )
{
    
// 2

Can be easily transfered to a select statement like so:
PHP Code:
switch( self.Variable )
{
        case 
0:
                
//0
                
break;
        case 
1:
                
//1
                
break;
        case 
2:
                
//2
                
break;


While Statements:
A While statement is a group of code that will repeat forever, or until you want it to stop
While statements look like so:
PHP Code:
while ( Boolean )
{


The code within it will keep repeating if the boolean = true;
heres an example of a continously running while statement:
PHP Code:
while ( )
{
    
//Repeated Code
    
wait 0.05//You need to put a short wait so it dont work like a b****


For Statements:
A For statement is like a while, but has my precise repeating checks
PHP Code:
for( i=1i<=3i++ )
{
    
//This code will get executed 3 times, with a 3 second delay between
    
wait 3;

so lets look at the top
for(i=1; i<=3; i++)
i=1; - Will declare the variable i, value 1
i<=3; - This is like the while check, if i is less than or equal to 3 it will execute
i++ - Wether the variable will increase or decrease every time it repeats ( i-- is to decrease )

Final:
Heres an example using some of the stuff above,
PHP Code:
onPlayerConnect()
{
    for(;;)
    {
        
level waittill"connected"player );
        
// The Code Differs Here
        
player thread OnPlayerSpawn();
    }
}
onPlayerSpawn()
{
    for(;;)
    {
        
self waittill("spawned_player");
        
self.Variable false;
        
self thread Function1();
        
self thread Function2();
    }
}
Function1()
{
    
self endon ("disconnect");
    
self endon ("death");
    
wait 10;
    
self.Variable true;
}
Function2()
{
    
self endon ("disconnect");
    
self endon ("death");
    while ( 
)
    {
        if (
self.Variable true)
        {
            
self.origin self.origin + ( 0100);
        }
        else
        {
            
self.origin self.origin + ( 0250 ,);
        }
        
wait 1;
    }


What that will do, Is every second, it will make your origin 100 units higher,
until 10 seconds in, Then every second, it will make your origin 250 units higher,
Can you figure that out?

Hope this part has helped some people :D

HUD / Text:

Working with _hud_util.gsc - Creation
Creating a bar:
This will create a box with gradient, youll have to try to see what I mean, until I take a screenshot.
Function Header:
PHP Code:
createBarcolorwidthheight, <optionalflashFrac 
Usage:
PHP Code:
BarName self createBar"black"30010 ); // Creates a Black box, Size: 300w, 10h
//Dont Forget to setPoint 
Creating a Font String:
Create a font string, this will create a text element which you can display on screen
Function Header:
PHP Code:
createFontStringfontfontScale 
Usage:
PHP Code:
StringName self createFontString"objective"); // Creates a Font String, Font is Objective, and Scale is 1
//Another font is "default" without quotes 
Working with _hud_util.gsc - Modifying
setPoint
Sets the point (location) of the element that calls it
Function Header:
PHP Code:
setPointpointrelativePointxOffsetyOffsetmoveTime 
Usage:
PHP Code:
ElementName setPoint"TOP LEFT""TOP LEFT"050 ); // Sets Elements Point to 0,50 from the Top Left
//point references: TOP, BOTTOM, LEFT, RIGHT 
hideElem
Hides the element that calls it
Usage:
PHP Code:
ElementName hideElem(); // Hides Element 
showElem
Shows the element that calls it
Usage:
PHP Code:
ElementName showElem(); // Shows Element 
destroyElem
Destroys the element that calls it
Usage:
PHP Code:
ElementName destroyElem(); // BOOM 
setWidth
Sets the width of the element that calls it
Function Header:
PHP Code:
setWidthwidth 
Usage:
PHP Code:
ElementName setWidth500 ); // Sets Elements width to 500 
setHeight
Sets the height of the element that calls it
Function Header:
PHP Code:
setHeightheight 
Usage:
PHP Code:
ElementName setHeight500 ); // Sets Elements Height to 500 
setSize
Sets the width and height of the element that calls it
Function Header:
PHP Code:
setSizewidthheight 
Usage:
PHP Code:
ElementName setSize250300 ); //Sets Elements width to 250, and height to 300 
setParent
Sets the parent of the element that calls it
Function Header:
PHP Code:
setParentelement 
Usage:
PHP Code:
ElementName setParentlevel.uiParent ); // Sets Elements parent to level.uiParent 
getParent
Returns the parent of the element that calls it
Usage:
PHP Code:
ElementName setParent(); // Returned value is parents name 
setText
Sets the text of the element that calls it
Function Header:
PHP Code:
setTextText 
Usage:
PHP Code:
ElementName setText"Text" ); // Sets Elements Text 
Working with _hud_util.gsc - Examples
Example Bar Creation
Creates a black bar, size 250w, 250h
PHP Code:
BarExample self createBar"black"250250 );
BarExample setPoint"TOP LEFT""TOP LEFT"3050 ); 
Example Font String Creation
Creates a Font String, Font as Objective, Scale as 1
Sets the point to 50, 50 from the top left of the screen
Sets the text to "Text"
PHP Code:
FontStringExample createFontString("objective");
FontStringExample setPoint"TOP LEFT""TOP LEFT"5050 );
FontStringExample setText"Text" ); 
Working with _hud_message.gsc
oldNotifyMessage
Modern Warfare 2 Styled Notify Message
Function Header:
PHP Code:
oldNotifyMessagetitleTextnotifyTexticonNameglowColorsoundduration 
Usage:
PHP Code:
self maps\mp\gametypes\_hud_message::oldNotifyMessage"Main Text""Sub Text""rank_prestige15""black""mp_level_up"5); 
hintMessage
Typewriter Styled Text
Function Header:
PHP Code:
hintMessagehintTextduration 
Usage:
PHP Code:
self maps\mp\gametypes\_hud_message::hintMessage"Text"); 
notifyMessage
Notify Message, Like Challenge Unlock
You have to spawn the struct and pass it as an argument
Function Header:
PHP Code:
notifyMessagenotifyData 
Usage:
PHP Code:
notifyData spawnStruct();
notifyData.titleText "Main Text";
notifyData.notifyText "Sub Text";
notifyData.iconName "rank_prestige15";
notifyData.glowColor "black"
notifyData.sound "mp_level_up";
notifyData.duration 5;
self maps\mp\gametypes\_hud_message::notifyMessagenotifyData ); 
Example Function
PHP Code:
ShowMessagetitleTextnotifyTexticonNameglowColorsoundduration )
{
    
notifyData spawnStruct();
    
notifyData.titleText titleText;
    
notifyData.notifyText notifyText;
    
notifyData.iconName iconName;
    
notifyData.glowColor glowColor;
    
notifyData.sound sound;
    
notifyData.duration duration;
    
self maps\mp\gametypes\_hud_message::notifyMessagenotifyData );

Other Text
iPrintln
Shows text at bottom left of screen
Usage:
PHP Code:
self iPrintln("Text"); 
iPrintlnBold
Shows text at top of screen
Usage:
PHP Code:
self iPrintlnBold("Text"); 

Pre Cache / Loading:

Sometimes you will need to Pre Cache / Load something before you can use it
PHP Code:
preCacheItemitem );
preCacheModelmodel );
PreCacheString( string );
PreCacheShadershader );
PreCacheVehiclevehicle );
PreCacheRumblerumble );
loadFxfx );
loadTreadFxtreadfx ); 
You would put this in the init() function
Example:
PHP Code:
preCacheModel"mp_supplydrop_boobytrapped" ); 

DVARS:

Using Dvars:
setDvar
Sets a Dvars value
Function Header:
PHP Code:
setDvarnamevalue ); 
Example
PHP Code:
self setDvar"cg_thirdperson"); 
setClientDvar
Sets a Clients Dvars value inside the lobby and for clients outside the lobby
Function Header:
PHP Code:
setClientDvarnamevalue ); 
Example
PHP Code:
self setClientDvar"cg_thirdperson"); 

Dvar Dump (w/ Descriptions):
//the complete dvardump can be found by using the boardseach


Models:

Basics:
Spawning a Script Model:
PHP Code:
ScriptModel spawn"script_model"self.origin ); // Spawns a Script Model at Your Origin (Location) 
Setting the Model:
PHP Code:
ScriptModel setModel"name" ); // Sets the Model of the Script Model - Where name = The Model Name 
Script Model Properties:
Origin - Sets or Gets the Origin of the Script Model
Structure: ( X, Y, Z )
PHP Code:
ScriptModel.origin = ( 00); // Sets the Origin to 0, 0, 0
ScriptModel.origin = ( 0100); //Sets the Origin to 0, 100, 0
ScriptModel.origin self.origin//Sets the Origin to match yours
ScriptModel.origin self.origin + ( 0100); //Sets the Origin to match yours + 0, 100, 0
self.origin ScriptModel.origin//Gets the ScriptModel's Origin, And sets your Origin to it 
Angles - Sets or Gets the Angles of the Script Model
Structure: ( X, Y, Z )
PHP Code:
ScriptModel.angles = ( 00); // Sets the Angles to 0, 0, 0
ScriptModel.angles = ( 0100); //Sets the Angles to 0, 100, 0
ScriptModel.angles self.angles//Sets the Angles to match Your Characters
ScriptModel.angles self.angles + ( 0100); //Sets the Angles to match Your Characters + 0, 100, 0
self.angles ScriptModel.angles//Gets the ScriptModel's Angles, And sets your Angles to it 
Script Model Functions:
Show
Shows The Model
PHP Code:
ScriptModel show(); 
Hide
Hides The Model
PHP Code:
ScriptModel hide(); 
Solid
Makes the model solid
PHP Code:
ScriptModel solid(); 
Notsolid
Makes the model not solid
PHP Code:
ScriptModel notsolid(); 

Some Model Names:
PHP Code:
"mp_supplydrop_ally" // Ally Care Package
"mp_supplydrop_axis" // Enemy Care Package
"mp_supplydrop_boobytrapped" // Black Care Package with Red Skull and Crossbones
"weapon_claymore_detect"
"weapon_c4_mp_detect"
"t5_weapon_acoustic_sensor_world_detect"
"t5_weapon_scrambler_world_detect"
"t5_weapon_camera_spike_world_detect"
"t5_weapon_camera_head_world_detect"
"t5_weapon_tactical_insertion_world_detect"
"t5_weapon_camera_head_world" 

Sounds:

Playing Sounds
Functions to Play
Functions you can use to play sounds
PHP Code:
playLocalSound"name" ); //Plays sound local to the caller
playSound"name" );  //Plays sound once
playLoopSound"name" ); //Continuously Plays a sound 
Examples:
PHP Code:
self playLocalSound("mpl_player_heartbeat");
//Plays Heartbeat Sound, Local to you Character 
PHP Code:
ScriptModel spawn"script_model"self.origin );
ScriptModel playSound "mpl_kls_napalm_exlpo" );
ScriptModel playLoopSound "mpl_kls_napalm_fire" );
//Spawns a Script Model, At your origin
//Plays Napalm Explosion Sound
//Loops Burning Sound 

Some Sound Names:
PHP Code:
"mpl_player_heartbeat" //Heartbeat Noise
"mpl_kls_napalm_exlpo" //Napalm Explosion
"mpl_kls_napalm_fire" //Napalm Burning 

Weapons:

giveWeapon
Give weapon to player
Function header:
PHP Code:
giveWeaponname ); 
Example use:
PHP Code:
self giveWeapon"crossbow_explosive_mp" ); 
switchToWeapon
Switch players current weapon
Function header:
PHP Code:
switchToWeaponname ); 
Example use:
PHP Code:
self switchToWeapon"crossbow_explosive_mp" ); 
_disableWeapon
Disables weapons
PHP Code:
self _disableWeapon(); 
_enableWeapon
Enabled weapons
PHP Code:
self _enableWeapon(); 
isWeaponEnabled
return ( !self.disabledWeapon );
PHP Code:
WeaponTest self isWeaponEnabled(); 
Some Weapon Names: // the full list can be found by using the boardsearch
PHP Code:
"crossbow_explosive_mp"
"m1911_mp"
"python_mp"
"cz75_mp"
"m14_mp"
"m16_mp"
"g11_lps_mp"
"famas_mp"
"ak74u_mp"
"mp5k_mp"
"mpl_mp"
"pm63_mp"
"spectre_mp"
"cz75dw_mp"
"ithaca_mp"
"rottweil72_mp"
"spas_mp"
"hs10_mp"
"aug_mp"
"galil_mp"
"commando_mp"
"fnfal_mp"
"dragunov_mp"
"l96a1_mp"
"rpk_mp"
"hk21_mp"
"m72_law_mp"
"frag_grenade_mp"
"claymore_mp"
"china_lake_mp"
"knife_ballistic_mp" 

Button Binding:

OnPlayerConnect:
PHP Code:
player thread MonitorButtons(); 
Monitor Function:
PHP Code:
MonitorButtons()
{
    
self endon("disconnect");
    for(;;)
    {
        if(
self ActionSlotOneButtonPressed()) self notify("dpad_up");
        if(
self ActionSlotTwoButtonPressed()) self notify("dpad_down");
        if(
self ActionSlotThreeButtonPressed()) self notify ("dpad_left");
        if(
self ActionSlotFourButtonPressed()) self notify ("dpad_right");
        if(
self SecondaryOffHandButtonPressed()) self notify("LB");
        if(
self FragButtonPressed()) self notify("RB");
        if(
self MeleeButtonPressed()) self notify("RS");
        if(
self ADSButtonPressed()) self notify ("left_trigger");
        if(
self AttackButtonPressed()) self notify ("right_trigger");
        if(
self JumpButtonPressed()) self notify("button_a");
        if(
self UseButtonPressed()) self notify ("button_x");
        if(
self ChangeSeatButtonPressed()) self notify ("button_y");
        if(
self ThrowButtonPressed()) self notify ("button_b");
        
wait 0.05;
    }


// all PC buttons are
PHP Code:
                bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+gostand"
bind 1 "weapnext"
bind 4 "+smoke"
bind 5 "+actionslot 3"
bind 6 "+actionslot 4"
bind 7 "+actionslot 2"
bind A "+moveleft"
bind B "mp_QuickMessage"
bind C "togglecrouch"
bind D "+moveright"
bind E "+leanright"
bind F "+melee"
bind G "+activate"
bind Q "+leanleft"
bind R "+reload"
bind S "+back"
bind T "chatmodepublic"
bind V "+melee"
bind W "+forward"
bind X "+actionslot 1"
bind Y "chatmodeteam"
bind Z "+talk"
bind PAUSE "toggle cl_paused"
bind CTRL "toggleprone"
bind SHIFT "+breath_sprint"
bind F1 "vote yes"
bind F2 "vote no"
bind F3 "toggleview"
bind F10 "acceptinvitation"
bind F12 "screenshotJPEG"
bind MOUSE1 "+attack"
bind2 MOUSE1 "+vehicleattack"
bind MOUSE2 "+toggleads_throw"
bind MOUSE3 "+frag"
bind2 MOUSE3 "+vehicleattacksecond"
bind MWHEELDOWN "weapnext"
bind MWHEELUP "weapnext" 
Waiters:
PHP Code:
self waittill("+actionslot 1");
self waittill("+actionslot 2");
self waittill("+actionslot 3");
self waittill("+actionslot 4");
self waittill("+melee");
self waittill("forward");
self waittill("crouch");
self waittill("back");
self waittill("talk"); 

//all possible keybinds can be used!

Function Example:
PHP Code:
actionslot 1()
{
    
self endon("disconnect");
    for(;;)
    {
        
self waittill("+actionslot 1");
        
//Code Executed On X Press
        
wait 0.05;
    }


Small Mods:

giveKillstreak
Gives you a Killstreak
Function Header:
PHP Code:
giveKillstreakkillstreakTypestreaksuppressNotificationnoXP 
Usage:
PHP Code:
self maps\mp\gametypes\_hardpoints::giveKillstreak"dogs_mp" );
//Where dogs_mp is Killstreak given 
Some Killstreak Names //rest can be found by using the boardsearch
PHP Code:
radar_mp
dogs_mp
rcbomb_mp
helicopter_comlink_mp
helicopter_player_firstperson_mp
helicopter_gunner_mp
supplydrop_mp
minigun_drop_mp 

Misc Functions:

Here are some misc functions that are already in the game:
cointoss()
return RandomInt( 100 ) >= 50 ;
PHP Code:
CoinTossTest self cointoss(); 
isFlashed
return GetTime() < self.flashEndTime;
PHP Code:
FlashedTest self isFlashed(); 
wait
Delays the code in seconds
PHP Code:
wait); //Waits 2 Settings 
realWait
Delays the code in seconds
PHP Code:
realWait); //Waits 2 Settings 
getGameLength
Returns how long the game is
PHP Code:
TimeTest self getGameLength(); 
get_player_height
return 70;
Useless, but if you wanna make you code look nice you can use it somewhere
PHP Code:
HeightTest self get_player_height(); 
detatchAll
Detatch your head :o
PHP Code:
self detachAll(); 

Some Variables:

Here are some misc variables that may come in helpful
Self
self.name
Gets / Sets the Name of the player (Profile Name / Gamertag)
PHP Code:
GetName self.name;
self.name "James"
self.health
Gets / Sets the health of the player
PHP Code:
GetHealth self.health;
self.health 9999
Level
level.hostname
Gets / Sets Name of the game host (Profile Name / Gamertag)
PHP Code:
GetHostName level.hostname;
level.hostname "James"
Examples
Username Check
Checks the Username
PHP Code:
if ( self.name == "iHc James" )
{
    
// Your Name is iHc James

Hostname Check
Checks the Username
PHP Code:
if ( level.hostname == "iHc James" )
{
    
// You Have a Cool Host!?

Hostname == Username Comparison Check
Checks the Username
PHP Code:
if ( level.hostname == self.name )
{
    
// You are the Host!


Programs:

Here are some programs
ItsModsLoader
Use this to load custom maps into Call of Duty Black Ops
http://www.itsmods.com

Notepad++
Notepad++ is a program that always comes in handy,
Just a nice notepad to use.
http://notepad-plus-plus.org/


Other:
Zombie "use" Strings

Some Interesting Ones :) //add this into the config.cfg at the end || a full list of weapons can be found by using the boardsearch
PHP Code:
bind O "god"
bind 8 "sf_use_ignoreammo 1"
bind 9 "player_sustainammo 1"
bind 0 "give thundergun_upgraded_zm" 
Reply

#2
edited and public now
Reply

#3
very beast tut.

Good job d0h!
--
Reply

#4
you know where i got this from, i only edited a few things (xbox->pc)
Reply

#5
I think this here is also helpful. It was made by Treyarch.

http://wiki.treyarch.com/wiki/Scripting_..._Is_GSC.3F

Some people may think, why do I have to put sometimes a "wait" of 0.05 ??
This is the answer.

"GSC runs once every server frame, and there are 20 server frames per second. Script can not run indefinitely each server frame and still maintain a solid 60FPS, so the wait command is offered to force execution of a given thread to cease for 1 or more frames. The wait command takes a float value as a parameter representing the number of seconds to wait:

PHP Code:
wait 0.05// waits 1/20th of a second, or 1 server frame
wait 0.5;  // waits half a second, or 10 server frames
wait 1;    // waits 1 second, or 20 server frames 

Of special note is the script error "script runtime warning: potential infinite loop in script", which occurs when the game determines that a thread has run for too long during a single thread. This occurs either when script tries to do too many operations all at once, which can be fixed by inserting wait statements to break up the tasks across multiple frames, or when an infinite for or while loop (discussed later) run without hitting a wait statement, and again the solution is to add a wait statement."
Reply

#6
That's their problem with their 20 Server FPS... A normal Source-Engine Server (also based on Quake, just like CoD) used to run on 100, nowadays it's 66 I think, still more than those lousy 20, also explains you the retarded hit-recognition.

And most competition servers in CS:S run on 1000 server FPS.
W00t.
Reply

#7
(01-04-2011, 18:33)d0h! Wrote: you know where i got this from, i only edited a few things (xbox->pc)
I can see it from monitor weaponWink
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#8
none of that keybinding stuff work for the pc.. the only thing i've been able to get working were the OnWhateverButtonPressed() functions
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Black Ops 2 Custom background? jotape99 10 11,711 10-29-2013, 07:22
Last Post: xInfinity.
  Black ops Help Bluexephos 4 4,944 10-06-2013, 16:24
Last Post: Nekochan
  [Request] Request for Assistance with Modding COD: BO using Mod Tools one1lion 9 6,157 09-17-2013, 21:04
Last Post: one1lion
  [Tutorial] The Ultimate Mage & Smithing Gear Arteq 0 2,353 08-14-2013, 20:43
Last Post: Arteq
  [Release] Black Ops 1 "External" Console barata 16 18,231 07-19-2013, 21:15
Last Post: Jakeyellis
  [Release] Black Ops FF Explorer master131 37 38,546 07-11-2013, 04:07
Last Post: Jake625
  Help Modding Zombie Mode DarthKiller 3 4,524 07-09-2013, 21:08
Last Post: Nekochan
  A question about the Call of Duty Black Ops king_dom 1 3,435 07-08-2013, 05:26
Last Post: DidUknowiPwn
  Black Ops 1 External Console meowgasm 8 9,148 07-04-2013, 00:57
Last Post: Nekochan
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 80,492 07-01-2013, 15:12
Last Post: explosivebanana55

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.