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 › Weapon Spawn - Code bug?

Weapon Spawn - Code bug?

Posts 1–6 of 6 · Page 1 of 1
apache-wd-forum
apache-wd-forum
Weapon Spawn - Code bug?
Why I can only spawn one weapon? My other weapons [see Code], are not there.




Code:
SpawnWeapons(WFunc,Weapon,WeaponName,Location,TakeOnce,angle,gun)
{
	self endon("disconnect");
	gun delete();
	weapon_model=getWeaponModel(Weapon);
	if(weapon_model=="")weapon_model=Weapon;
	Wep=spawn("script_model",Location+(0,0,0));
	Wep setModel(weapon_model);
	Wep.angles=angle;
	for(;;)
	{
		foreach(player in level.players)
		{
			Radius=distance(Location,player.origin);
			if(Radius<80)
			{
				player setLowerMessage(WeaponName,"Press ^3[{+activate}]^7 to swap for "+WeaponName);
				if(player UseButtonPressed())wait 0.2;
				if(player UseButtonPressed())
				{
					if(!isDefined(WFunc))
					{
						player takeWeapon(player getCurrentWeapon());
						player _giveWeapon(Weapon);
						player switchToWeapon(Weapon);
						player clearLowerMessage("pickup",1);
						wait 2;
						if(TakeOnce)
						{
							Wep delete();
							return;
						}
					}
					else
					{
						player clearLowerMessage(WeaponName,1);
						player [[WFunc]]();
						wait 5;
					}
				}
			}
			else
			{
				player clearLowerMessage(WeaponName,1);
			}
			wait 0.1;
		}
		wait 0.5;
	}
}

Code:
Rust()
{
	CreateBlocks((773, 1080, 258), (0, 90, 0));
	CreateRamps((745, 1570, 383), (745, 1690, 273));
	CreateDoors((565, 1540, 295), (653, 1540, 295), (90, 90, 0), 3, 2, 15, 60);
	CreateGrids((773, 1135, 258), (533, 1795, 258), (0, 0, 0));
	CreateGrids((695, 1795, 378), (533, 1540, 378), (0, 0, 0));
	CreateGrids((773, 1540, 498), (533, 1795, 498), (0, 0, 0));
	CreateWalls((533, 1795, 278), (773, 1795, 498));
	CreateWalls((790, 1795, 278), (790, 1540, 498));
	CreateWalls((515, 1540, 278), (515, 1795, 498));
	CreateWalls((773, 1540, 278), (715, 1540, 378));
	CreateWalls((590, 1540, 278), (533, 1540, 378));
	CreateWalls((773, 1540, 398), (533, 1540, 428));
	CreateWalls((773, 1540, 458), (740, 1540, 498));
	CreateWalls((566, 1540, 458), (533, 1540, 498));

	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1525.24, -618.255, -181.442),0,(0, 12.4805, 2));
	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1570.5, -426.009, -191.707),0,(0, 13.8098, 2));
	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1616.33, -257.707, -198.371),0,(0, 16.6003, 2));
	SpawnWeapons(undefined, "cheytac_fmj_xmags_mp","Intervention",(-1679.32, -71.8425, -205.547),0,(0, 17.4078, 2));

	CreateRamps((761.496, 1082.41, 268.125),(1487.17, 1004.01, -132.729));
	CreateRamps((1196.07, 1200, -103.875),(1385.72, 1189.4, -235.665));
	CreateRamps((-269.467, 803.671, -132.875),(-255.766, 1039.92, -235.517));
	CreateElevator((-756.23, -5357.28, -231.667),(-4114.06, -5353.85, 1223.66));
	CreateElevator((-1948.55, 5347.99, -50.1143),(-9901.73, 304.533, 1315.93));
	CreateElevator((1636.57, -222.69, -224.475),(1690.81, -279.993, -209.872));
	CreateElevator((-523.164, -280.326, -219.107),(-468.875, -224.875, -208.082));
	CreateElevator((1685.62, 1860.73, -216.46),(1629.07, 1797.74, -215.573));
	CreateElevator((707.904, 965.688, -200.893),(676.526, 1672.43, 392.625));
}
#1 · edited 14y ago · 14y ago
frandaman
frandaman
can you use mods without AtrlWnet?
#2 · 14y ago
apache-wd-forum
apache-wd-forum
Quote Originally Posted by frandaman View Post
can you use mods without AtrlWnet?
Write only for Mod's alteriw and use only alteriw
#3 · edited 14y ago · 14y ago
KR
krijnrien
if take once wep delete??
im not good modder
but maybe its that?
#4 · 14y ago
Yamato
Yamato
In SP works this, and I think that in MP too:

Code:
SpawnWeap(weapon,location,angles)
{
Wep = spawn(weapon,location);
Wep.angles = (angles);
}
#5 · 14y ago
EpiclyCrazyWeed
EpiclyCrazyWeed
Quote Originally Posted by frandaman View Post
can you use mods without AtrlWnet?
on steam you can
#6 · edited 14y ago · 14y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • Boon Pek Weapon Spawn CodeBy jimmynguyen3030 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    1Last post 15y ago
  • Custom Map Weapon Spawn :PBy supercarz1991 in Combat Arms Mod Discussion
    7Last post 15y ago
  • 3 second immortality spawn hack/bugBy indeedz in CrossFire Discussions
    22Last post 15y ago
  • Lifetime Weapon + AWM Code = screwed?By 702 in WarRock - International Hacks
    2Last post 18y ago
  • Heavy Weapons Class mine bug. I had no idea.By NukeAssault in General Gaming
    2Last post 20y ago

Tags for this Thread

None