Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 7 - Black Ops Hacks & Cheats › Call of Duty Black Ops Server & GSC Modding › Modding changes from MW2 to Black Ops

Modding changes from MW2 to Black Ops

Posts 1–4 of 4 · Page 1 of 1
master131
[MPGH]master131
Modding changes from MW2 to Black Ops
As some of you may have already known, there have been some slight alterations to modding and coding in GSCs. Some functions and some have been removed. Here are some significant changes in Black Ops.

notifyOnPlayerCommand is no longer supported. In MW2 this was a good way to open custom menus and do custom functions but this was removed in Black Ops possibly because it served no pupose. Now, you have to use a while statement with an if statement saying if the button was pressed or not. This can be inconvenient if a somethingbuttonPressed() wasn't created for the thing you wanted. Like if I wanted to use weapnext, there's no such thing as weapnextButtonPressed().

Example:
Code:
Modern Warfare 2:
self notifyOnPlayerCommand("frag", "+frag");
while(1) {
    self waittill("frag");
    //Do functions here
}

Black Ops:
while(1) {
    if(self fragButtonPressed()) {
        //Whatever functions here
    }
    wait 0.01;
}
Here a list of buttonPressed functions you can use:
Code:
AdsButtonPressed()
AttackButtonPressed()
MeleeButtonPressed()
UseButtonPressed()
ActionSlotOneButtonPressed() //X
ActionSlotTwoButtonPressed() //not sure do they exist (7)
ActionSlotThreeButtonPressed() // not sure do they exist (5)
actionSlotFourButtonPressed() //6
ThrowButtonPressed() //uhhhhh, +speed_throw? That would be MOUSE2 then.
changeSeatButtonPressed() //wut?
jumpButtonPressed() //space
fragButtonPressed() //G/MOUSE3
secondaryOffhandButtonPressed() //4
Thanks Deathmax!

foreach has also been removed in Black Ops. This was useful in MW2 if you wanted to do something like foreach(player in level.players) but this function doesn't exist any longer, possibly because it is a 'lazy' way or shortcut to using a for statement.

Example:
Code:
Modern Warfare 2:
foreach(player in level.players) {
    player suicide();
}

//===============

weaponsList = self getWeaponsListAll();
foreach(weapon in weaponsList) {
    self setWeaponAmmoStock(weapon, 99999);
    self setWeaponAmmoClip(weapon, 99999);
}

Black Ops:
for(i = 0; i < level.players.size; i++) {
    level.players[i] suicide();
}

//===============

weaponsList = self getWeaponsList();
for(i = 0; i < weaponsList.size; i++) {
    self setWeaponAmmoStock(weaponsList[i], 99999);
    self setWeaponAmmoClip(weaponsList[i], 99999);
}
Using a function on a variable that hasn't been declared (even if it has self.whatever) now generates syntax errors, in MW2 this was useful in creating or 'refreshing' font strings over and over again.

Example:
Code:
Modern Warfare 2:
self.someText destroy();
self.someText = self createFontString("default", 2);
self.someText setPoint("CENTER", "CENTER", "CENTER", "CENTER");
self.someText setText("This is a test!");

Black Ops:
if(isDefined(self.someText)) {
    self.someText destroy();
}
self.someText = self createFontString("default", 2);
self.someText setPoint("CENTER", "CENTER", "CENTER", "CENTER");
self.someText setText("This is a test!");
Just a mini-note, setPoint seems to be a little buggy on Black Ops so you can use the following instead:
Code:
Using codes only:
self.someText.alignX = "CENTER"; //X position
self.someText.alignY = "CENTER"; //Y position
self.someText.X = 0; //X offset
self.someText.Y = 0; //Y offset

Using a function:
setPosition(alignX, alignY, X, Y)
{
    if(!isDefined(X)) {
        X = 0;
    }
    if(!isDefined(Y)) {
        Y = 0;
    }
    self.alignX = alignX;
    self.alignY = alignY;
    self.X = X;
    self.Y = Y;
}

//How to use:
//self.someText setPosition("CENTER", "CENTER");
//or
//self.someText setPosition("CENTER", "CENTER", -20, 10);
Any more changes? Let me know here, kinda got this all from the top of my head since I'm not at home.
#1 · edited 15y ago · 15y ago
AZUMIKKEL
AZUMIKKEL
self _setPerk("perk_name");
self _unsetPerk("perk_name");
no longer works.

self _clearPerks();
doesn't either, you can use self clearPerks(); but i can't confirm if it works.


If anyone figures this out, PLEASE tell me!

Edit: Found out. Silly me


Line 910: self setPerk( perk );
Line 914: self unsetPerk( perk );
#2 · edited 15y ago · 15y ago
master131
[MPGH]master131
Quote Originally Posted by AZUMIKKEL View Post
self _setPerk("perk_name");
self _unsetPerk("perk_name");
no longer works.

self _clearPerks();
doesn't either, you can use self clearPerks(); but i can't confirm if it works.


If anyone figures this out, PLEASE tell me!
I thought they did work, just remove the underscore from _setPerk and _unsetPerk.
#3 · 15y ago
Skyline.
Skyline.
cool thanks for the info champ!
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None