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 › [SOLVED] weapon code help fix =D

[SOLVED] weapon code help fix =D

Posts 1–8 of 8 · Page 1 of 1
TheSaboteur
TheSaboteur
[SOLVED] weapon code help fix =D
hajja =D




and this is my code:
Code:
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Intervention",Location+(60,90,25),0);



well it gives me bad Syntax :|



/reply =D
#1 · edited 15y ago · 15y ago
KE
kerocx
wheres the thread ?
#2 · 15y ago
TheSaboteur
TheSaboteur
got it to


here you go
Code:
SpawnWeapon(WFunc,Weapon,WeaponName,Location,TakeOnce)
{
self endon("disconnect");
weapon_model = getWeaponModel(Weapon);
if(weapon_model=="")weapon_model=Weapon;
Wep=spawn("script_model",Location+(0,0,3));
Wep setModel(weapon_model);
for(;;){
foreach(player in level.players){
Radius=distance(Location,player.origin);
if(Radius<25){
player setLowerMessage(WeaponName,"Press ^3[{+usereload}]^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;
}
#3 · 15y ago
master131
[MPGH]master131
You haven't defined what "Location" is on this:
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Inte rvention",Location+(0,0,0),0);

Location has to replaced with the location where the weapon if to be spawned like this:
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Inte rvention",(123,456,789)+(0,0,0),0);

The numbers you replaced was the angles, not the location..
#4 · 15y ago
TheSaboteur
TheSaboteur
EDIT!:


doesnt work:
Code:
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Intervention",(4738,-5596,2640)+(0,0,0),0);
i did the same as u said filled in the coordinates (4738,-5596,2640)
#5 · edited 15y ago · 15y ago
KE
kerocx
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Inte rvention",(4738,-5596,2640)+(0,0,0),0);
works for me. Ur thread needs another } at the bottom.
#6 · edited 15y ago · 15y ago
TheSaboteur
TheSaboteur
Quote Originally Posted by kerocx View Post
self thread SpawnWeapon(undefined,"cheytac_fmj_xmags_mp","Inte rvention",(4738,-5596,2640)+(0,0,0),0);
works for me. Ur thread needs another } at the bottom.
thanks my angel ^^
#7 · 15y ago
Insane
Insane
/Marked as Solved
#8 · 15y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

  • [SOLVED] Weapon CodesBy Grimkin92 in Call of Duty Modern Warfare 2 Help
    4Last post 16y ago
  • [SOLVED]key code helpBy zeffke008 in Call of Duty Modern Warfare 2 Help
    2Last post 15y ago
  • [SOLVED] Coding help.By dheir in Call of Duty Modern Warfare 2 Help
    5Last post 16y ago
  • [Solved]M9 Weapon CodeBy edub18 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    2Last post 15y ago
  • Please Help Fix this Code!By o0OpurezO0o in Visual Basic Programming
    42Last post 15y ago

Tags for this Thread

None