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 6 - Modern Warfare 2 (MW2) Hacks › Call of Duty Modern Warfare 2 Server / GSC Modding › MW2 Usefull functions.

MW2 Usefull functions.

Posts 1–4 of 4 · Page 1 of 1
RO
RowanWiiPC
MW2 Usefull functions.
Because we released Nemesis V2 we thought we release Well.. public the functions it has that might be usefull in your own mods =)



DeathIcon above head ( Can be changed, can be used for vip's ) :
Code:
addIcon(team)
{
        self endon( "death" );
        if ( !level.teambased )
                return;
        self endon("disconnect");
        wait .05;
        assert(team == "allies" || team == "axis");
        newdeathicon = newTeamHudElem( team );
        newdeathicon thread rozwalPoSmierci(self);
        newdeathicon.isShown = true;
        newdeathicon.alpha = .61;
        newdeathicon setShader("headicon_dead", level.objPointSize, level.objPointSize);
        newdeathicon setwaypoint( false, false );
        for(;;) {
                if ( self isUsingRemote() ) self waittill ( "stopped_using_remote" );
                newdeathicon.x = self.origin[0];
                newdeathicon.y = self.origin[1];
                newdeathicon.z = self.origin[2] + 84;
                wait .3;
        }
}
Code:
rozwalPoSmierci(player, endonthis, notForThisTeam)
{
        if(!isDefined(endonthis))
                endonthis = "rozwalone";
        self endon(endonthis);
        if(isDefined(notForThisTeam) && player.team == notForThisTeam) {
                self destroy();
                self notify(endonthis);
        }       
        player waittill ( "death" );
        self destroy();
}

Teddybear stuck to your head ( Buggy code we used in the begin, kinda fun :P and only works on a few maps ) :

self attach("com_teddy_bear", "j_head", false);




Mother of all bombs ( made by 4funplayin ) :
Code:
useMotherOfAllBombs()
{
    self endon ( "disconnect" );
        self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
        self.selectingLocation = true;
        self waittill( "confirm_location", location, directionYaw );
                NapalmLoc = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
        NapalmLoc += (0, 0, 400); // fixes the gay low ground glitch
        self endLocationSelection();
        self.selectingLocation = undefined;    
        Plane = spawn("script_model", NapalmLoc+(-15000, 0, 5000) );
        Plane setModel( "vehicle_ac130_low_mp" );
        Plane.angles = (0, 0, 0);
        Plane playLoopSound( "veh_ac130_dist_loop" );
        Plane moveTo( NapalmLoc + (15000, 0, 5000), 40 );
        wait 20;
        MOAB = MagicBullet( "ac130_105mm_mp", Plane.origin, NapalmLoc, self );
        wait 1.6;
        Plane playsound( "nuke_explosion" );
        Plane playsound( "nuke_explosion" );
        Plane playsound( "nuke_explosion" );
        MOAB delete();
        RadiusDamage( NapalmLoc, 1400, 5000, 4999, self );
        Earthquake( 1, 4, NapalmLoc, 4000 );
        level.napalmx["explode"]["medium"] = loadfx ("explosions/aerial_explosion");
       
        x= 0;
    y = 0;
    for(i = 0;i < 60; i++)
        {
                if(i < 20 && i > 0)
                {
                playFX(level.chopper_fx["explode"]["medium"], NapalmLoc+(x, y, 0));
                        playFX(level.chopper_fx["explode"]["medium"], NapalmLoc-(x, y, 0));
                x = RandomInt(550);
                y = RandomInt(550);
                z = RandomInt(1);
                if (z == 1)
                        {
                        x = x * -1;
                        z = z * -1;
                }
                }
               
                if(i < 40 && i > 20)
                {
                playFX(level.chopper_fx["explode"]["medium"], NapalmLoc+(x, y, 150));
                        playFX(level.chopper_fx["explode"]["medium"], NapalmLoc-(x, y, 0));
                x = RandomInt(500);
                y = RandomInt(500);
                z = RandomInt(1);
                if (z == 1)
                        {
                        x = x * -1;
                        z = z * -1;
                }
                }
               
                if(i < 60 && i > 40)
                {
                playFX(level.chopper_fx["explode"]["medium"], NapalmLoc+(x, y, 300));
                        playFX(level.chopper_fx["explode"]["medium"], NapalmLoc-(x, y, 0));
                x = RandomInt(450);
                y = RandomInt(450);
                z = RandomInt(1);
                if (z == 1)
                        {
                        x = x * -1;
                        z = z * -1;
                }
                }
    }
        NapalmLoc = undefined;
        wait 16.7;
        Plane delete();
       
        wait 30;
}
New napalm ( Made by MetPL Shorter code, thanks to Azumikkel for orginal napalm) :
Code:
doNapalm(high)
{
        self endon("disconnect");
        weapon = undefined;
        self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
        self.selectingLocation = true;
        self waittill( "confirm_location", location, directionYaw );
        self endLocationSelection();
        self.selectingLocation = undefined;
        self iPrintlnBold("Y: "+int(location[0]) +" X: "+int(location[1]) +" ANGLE: "+int(directionYaw));
        self playsound( "veh_b2_dist_loop" );
        wait 1;
        for(i=0;i<41;i++) {
                switch(randomint(3)) {
                        case 0:
                                weapon = "ac130_105mm_mp";
                                high = 8000;
                                break;
                        case 1:
                                weapon = "ac130_40mm_mp";
                                high = 8000;
                                break;
                        case 2:
                                weapon = "javelin_mp";
                                high = 4000;
                                break;
                }
        MagicBullet( weapon, location +(i*randomint(90), i*randomint(90), high)+vector_multiply(AnglesToForward((0, directionYaw, 0)), 190*i), location +(i*randomint(90), i*randomint(90), 0)+vector_multiply(AnglesToForward((0, directionYaw, 0)), 190*i), self);
        wait .25;
        }
}
Spawn a box:
Code:
SpawnBox(origin, model, hint, type, icon, solid, angles, name, addorigin, notusablebythisteam, missilecoords, missiletype)
{
        if(!isDefined(origin))
                return;
        if(!isDefined(notusablebythisteam))
                notusablebythisteam = "allies";
        if(!isDefined(name))
                name = undefined;
        if(!isDefined(missilecoords))
                missilecoords = undefined;
        if(!isDefined(missiletype))
                missiletype = 1;
        if(!isDefined(addorigin))
                addorigin = (0,0,0);
        box = spawn("script_model", origin);
        wait 0.05;
        if(isDefined(model)) box setModel( model );
        wait 0.05;
        if(isDefined(angles)) box.angles = angles;
        wait .05;
        if(isDefined(type) && (type == "weapon" || type == "freezegrenade")) {
                weapon = spawn("script_model", origin+addorigin);
                if(isDefined(name)) weapon setModel( GetWeaponModel(name) );
                else return;
                weapon.angles = (box.angles[0],box.angles[1],box.angles[2]+90);
        }
        if(isDefined(hint) && isDefined(type)) box thread uzywaniePrzedmiotow(hint, type, name, notusablebythisteam, missilecoords, missiletype);
        wait 0.05;
        if(isDefined(solid)) box CloneBrushmodelToScriptmodel( solid );
        wait 0.05;
        if(isDefined(icon)) box pokazNaMapie(icon);
}
 
SpawnBarrel(origin, model, hint, type, solid, angles, c4, multi, destructible, targetname, type)
{
        if(!isDefined(origin))
                return; 
        if(!isDefined(c4)) c4 = true;
        if(!isDefined(multi)) multi = 15;               
        if(!isDefined(destructible)) destructible = false;      
        if(!isDefined(targetname)) targetname = undefined;              
        if(!isDefined(type)) type = undefined;          
        for(i=-15;i<17;i+=multi) {
                if(i==15) a = (-45,-1,0);
                else a = (-8,5,0);
                while(isDefined(level.explosives[level.id]))
                        level.id = level.id+1;
                id = level.id;  
                level.explosives[id] = spawn("script_model", origin+(i,i,0)+a);
                if(c4) SpawnC4(level.explosives[id].origin+(0,0,45), GetWeaponModel("c4_mp", 0), undefined, id);
                wait 0.05;
                if(isDefined(model)) level.explosives[id] setModel( model );
                wait 0.05;
                if(isDefined(hint) && isDefined(type)) level.explosives[id] thread uzywaniePrzedmiotow(hint, type);
                wait 0.05;
                if(isDefined(solid)) level.explosives[id] CloneBrushmodelToScriptmodel( solid );
                wait .05;
                if(isDefined(angles)) level.explosives[id].angles = angles;
                if(destructible) {
                        level.explosives[id].targetname = targetname;
                        level.explosives[id].destructible_type = type;
                        level.explosives[id] common_scripts\_destructible::setup_destructibles();
                }
                wait 0.05;
        }
}
 
SpawnC4(origin, model, angles, i)
{
        if(!isDefined(origin))
                return;
        if(!isDefined(i))
                return;
        level.explosivesc4[i] = spawn("script_model", origin);
        wait 0.05;
        if(isDefined(model)) level.explosivesc4[i] setModel( model );
        wait 0.05;
        if(isDefined(angles)) level.explosivesc4[i].angles = angles;
        wait 0.05;
 
}
If you use a icon or emblem or title, don't forget to Precache it in init!!!

Like this : precacheShader( "cardicon_cod4" );


if these functions are usefull and you'd like to donate us you can @ rowan_aka_rowan-dinho@hotmail.com
#1 · edited 15y ago · 15y ago
[WhA]4FunPlayin
[WhA]4FunPlayin
Tags please! [co￾de] and [/co￾de]
#2 · 15y ago
Blubb1337
Blubb1337
Added [php] tags.
#3 · 15y ago
griezel32
griezel32
what does this mod code ?
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • CoD:MW2 Usefull informationBy marko4452 in Call of Duty Modern Warfare 2 Discussions
    3Last post 16y ago
  • [Poll] Just wanna noww for myself if i am usefull... [Poll]By Noxit in General
    64Last post 16y ago
  • Disable some of punkbuster's functions.By System79 in Game Hacking Tutorials
    3Last post 20y ago
  • help would be very usefullBy killablade in WarRock - International Hacks
    5Last post 19y ago
  • Advanced Hacking tutorial (How to find adresses for the coolest trainer functions)By nukeist_ in WarRock - International Hacks
    8Last post 19y ago

Tags for this Thread

None