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 › Call of Duty Modern Warfare 2 GSC Modding Help/Discussion › Simple Noob Question

Simple Noob Question

Posts 1–15 of 18 · Page 1 of 2
csimami
csimami
Simple Noob Question
So I found this on the internet:

for(;
{
self waittill( "spawned_player" );
if(self.name == " KeViN MW2 MoDz" || self.name == " zDreaMz o")


and i wanted to make it look like this:

onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread doSpawn();
}
}
{
self endon( "disconnect" );

for(;
{
self waittill( "spawned_player" );
if(self.name == "Csimami" || self.name == "CsiGhost")
self ThermalVisionFOFOverlayOn();
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "pmissle", true );
self giveWeapon( "m79_akimbo_mp", 0, false );
self giveWeapon ( "fal_akimbo_mp", 0 );



}


I´ve added this to rank.gsc but when im starting my server im getting an syntax error.
I really dont know what to do so pls help.


/Im sorry for my bad english\
#1 · 14y ago
Nachos
Nachos
Make your onPlayerSpawned look like this:
Code:
onPlayerSpawned()
{
	self endon("disconnect");
	for(;;)
	{
		self waittill("spawned_player");
		self thread doSpawn();
                self thread doAdmin();
	}
}
The paste this thread somewhere not in a thread:
Code:
doAdmin() {
	self endon ( "disconnect" );
	self endon ( "death" );
	
	if(self.name == "Csimami" || self.name == "CsiGhost")
                {
		self notifyOnPlayerCommand("5", "+actionslot 2");
		while(1) {
              	  	self ThermalVisionFOFOverlayOn();
                	self maps\mp\killstreaks\_killstreaks::giveKillstreak( "pmissle", true );
                	self giveWeapon( "m79_akimbo_mp", 0, false );
                	self giveWeapon ( "fal_akimbo_mp", 0 );
               		}
	}
}
Then, whenever you press 5 you will get the weapons, the PM and WH.
#2 · 14y ago
mathieutje12
mathieutje12
I shoud use
Code:
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
and
Code:
self giveWeapon( "m79_akimbo_mp", 0, true );
 self giveWeapon ( "fal_akimbo_mp", 0, true );
Full thread:
Code:
doAdmin1() {
	self endon ( "disconnect" );
	self endon ( "death" );
	self notifyOnPlayerCommand("5", "+actionslot 2");

	if(self.name == "Csimami" || self.name == "CsiGhost")
                {
		self waittill("5");              	  	
self ThermalVisionFOFOverlayOn();
                	self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true);
                	self giveWeapon( "m79_akimbo_mp", 0, true );
 self giveWeapon ( "fal_akimbo_mp", 0, true );[/
               			}
}
#3 · edited 14y ago · 14y ago
csimami
csimami
Hmm it isn´t working.
Maybe because of the Zombie Mod.
When you´re pressing 5 you´re buying the riot shield.
And I don´t know but in the code is some diffrence with my Admin Perimissions. (Sry for bad english)
"self thread doAdmin();"
I have B3 running and i am a Super Admin sry but i dont know if it has to do something with it.

/sry for bad English\
#4 · 14y ago
mathieutje12
mathieutje12
Did you already try out my thread above ur post?
#5 · 14y ago
csimami
csimami
yes i did but the problem is that i must press 5 for activating this but the button 5 is already set for buying items in the shop
#6 · 14y ago
KR
krijnrien
then use
- 3, actionslot 2 i thought, it could be 3 one of the 2
#7 · 14y ago
csimami
csimami
uhm what?^^
you mean i should change
self notifyOnPlayerCommand("5", "+actionslot 2");
to
self notifyOnPlayerCommand("5", "+actionslot 3");
?
I wanted to change the key to "0".
But i cant get it working when im changing to:
self notifyOnPlayerCommand("0", "+actionslot 2");
#8 · edited 14y ago · 14y ago
Nachos
Nachos
These are the available actionslots, you can't use other keys. Maybe you could code more actionslots.

Code:
bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+gostand"
bind 3 "+actionslot 3"
bind 4 "+actionslot 4"
bind 5 "+actionslot 2"
bind A "+moveleft"
bind C "toggleprone"
bind D "+moveright"
bind E "+activate"
bind F "+melee"
bind N "+actionslot 1"
bind Q "+smoke"
bind R "+reload"
bind S "+back"
bind U "chatmodeteam"
bind V "+talk"
bind W "+forward"
bind Y "chatmodepublic"
bind CTRL "togglecrouch"
bind SHIFT "+breath_sprint"
bind MOUSE1 "+attack"
bind MOUSE2 "+speed_throw"
bind MOUSE3 "+frag"
bind MWHEELDOWN "weapnext"
bind MWHEELUP "weapnext"
#9 · 14y ago
csimami
csimami
hmm... I cant get i working when im knifing "F" it does not work.

doAdmin() {
self endon ( "disconnect" );
self endon ( "death" );

if(self.name == "Csimami" || self.name == "CsiGhost")
{
self notifyOnPlayerCommand("F", "+melee");
while(1) {
self giveWeapon( "m79_akimbo_mp", 0, true );
self giveWeapon ( "fal_akimbo_mp", 0, true );
self giveWeapon ( "ac130_40mm_mp", 0, true );
}
}
}

I think the Zombie mod is the problem or... i dont know
#10 · 14y ago
Nachos
Nachos
Lol...

E is "+melee"
F is "+activate"

Sry

In fact you can type: Anything "+button"
Code:
doAdmin() {
	self endon ( "disconnect" );
	self endon ( "death" );
	
	if(self.name == "Csimami" || self.name == "CsiGhost")
	{
		self notifyOnPlayerCommand("Anything", "+keyfunction");
		while(1) {
		self waittill("same as Anything");
		//your stuff
		}
	}
}
Please use [CODE] tags...

#11 · edited 14y ago · 14y ago
csimami
csimami
hmm syntax error...
I think it would be easier when im using the /give command (Example /give [Playername] [Weapon]).
I Googled but found nothing for it.
Can someone post the Code for the give command?
#12 · edited 14y ago · 14y ago
csimami
csimami
okey i got it now but im only getting the killstreak means no weapons (Wtf?).
#13 · 14y ago
mathieutje12
mathieutje12
post ur new code again..
#14 · 14y ago
csimami
csimami
doAdmin() {
self endon ( "disconnect" );
self endon ( "death" );

if(self.name == "CsiUncut" || self.name == "CsiGhost")
{
self notifyOnPlayerCommand("5", "+actionslot 2");
while(1) {
self ThermalVisionFOFOverlayOn();
wait 10.0;
self maps\mp\killstreaks\_killstreaks::giveKillstreak( "predator_missile", true );
wait 0.1;
self giveWeapon ( "airdrop_mega_marker_mp", 0, true );
wait 0.1;
self giveWeapon ( "fal_akimbo_mp", 0, true );
self.maxhealth = 500;
self.health = self.maxhealth;
}
}
}

Here i am getting the overlay the KS and the MaxHealth but not the Marker and FAL
#15 · edited 14y ago · 14y ago
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

  • Hacking world of warcraft? & a noob questionBy arsholio in General Game Hacking
    9Last post 20y ago
  • Noob questionBy thedrowningfish in Visual Basic Programming
    7Last post 18y ago
  • Noob QuestionBy JustKnowMe in General
    5Last post 17y ago
  • noob questionBy rambuki in WarRock - International Hacks
    3Last post 18y ago
  • Noob question.By Homedawg68 in Combat Arms Hacks & Cheats
    1Last post 17y ago

Tags for this Thread

None