Post: [Code][Release] Easy Modern Warfare 2 Gun Selector
09-10-2013, 07:59 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NGU, today im releasing my "Easy Gun Selector" that i had in my Immense Galaxy v1 patch.

First of all, you need to put these codes somewhere.
    
//code to give weapon and tell the weapon code
GiveNWeap(p)
{
self giveWeapon(p);
self BH("Recieved Weapon: "+p);
}

//Randomises iprintln text color
BH(t){ self iprintln("^"+Randomint(7)+t); }


Secondly you need to understand how to work basic menu structures.
Master Ro's bases are very simple with this code as the way he has it all set up is easy and typically looked like this
    
self AddMenuOption( "Menu Name", "Menu Option Name", ::Function, "Parent" );

so if your using his bases, you do it like this:
    
self addUserMenuAction( "Menu Name", "Gun Name", ::GiveNWeap, "Weapon Code" );


The DConnor base has its menu set up like this
    
menu.name[2]="Menu Name";
menu.function[2]=::Function;
menu.input[2]=Parent;

If you want to use my Easy Gun Selector you do it like this
    
menu.name[2]="Gun Name";
menu.function[2]=::GiveNWeap;
menu.input[2]=Fun Code;


it works the same way with every menu no matter what just thread ::GiveNWeap and set the parent as the gun code.
Now for the gun codes themselves. These were found by CraigChrist8239. The matching of weapon codes to weapon names was done by Me(blackhawk2299), Taylor(xYARDSALEx), and Matt(iTrexk).

    
//Ar
M4A1 m4_mp
Famas famas_mp
Scar-H scar_mp
Tar-21 tavor_mp
Fal fal_mp
M16A4 m16_mp
ACR masada_mp
F2000 fn2000_mp
Ak-47 ak47_mp

//Smg
MP5K mp5k_mp
UMP45 ump45_mp
vector kriss_mp
P90 p90_mp
Mini-Uzi uzi_mp
Peacekeeper (PC ONLY) m16_shotgun_xmags_mp

//lmg
L86 LSW sa80_mp
RPD rpd_mp
MG4 mg4_mp
Aug Hbar aug_mp
M240 m240_mp

//sniper
Intervention cheytac_mp
Barrett .50 Cal barrett_mp
WA2000 wa2000_mp
M21 EBR m21_mp

PP2000 pp2000_mp
G18 glock_mp
M93 Raffica beretta393_mp
TMP tmp_mp

//shotgun
Spas-12 spas12_mp
AA-12 aa12_mp
Striker striker_mp
Ranger ranger_mp
M1014 m1014_mp
Model 1887 model1887_mp

//pistol
Usp .45 usp_mp
.44 Magnum coltanaconda_mp
M9 beretta_mp
Desert Eagle deserteagle_mp
Gold Desert Eagle deserteaglegold

//launchers
AT4-HS at4_mp
THUMPER m79_mp
STINGER stinger_mp
JAVELIN javelin_mp
RPG-7 rpg_mp


so to make this work, you would do
    
self addUserMenuAction( "ARSM", "Tar-21", ::GiveNWeap, "tavor_mp" );

Or
    
menu.name[2]="Tar-21";
menu.function[2]=::GiveNWeap;
menu.input[2]=tavor_mp;



(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to blackhawk2299 for this useful post:

GodofHosting, JLM, Jordan G., Mango_Knife, TheMrGeekyMoDz

The following 5 users groaned at blackhawk2299 for this awful post:

ByteSource, CoDyMoDz1000XD, JackMods-, The Kosmic
09-10-2013, 08:05 PM #2
GodofHosting
Bounty hunter
Nice Job, Carlos Needa
09-10-2013, 08:10 PM #3
Originally posted by GodofHosting View Post
Nice Job, Carlos Needa


Thank you, Eric
09-10-2013, 10:16 PM #4
FutureOps
Little One
Originally posted by blackhawk2299 View Post
Hello NGU, today im releasing my "Easy Gun Selector" that i had in my Immense Galaxy v1 patch.

First of all, you need to put these codes somewhere.
    
//code to give weapon and tell the weapon code
GiveNWeap(p)
{
self giveWeapon(p);
self BH("Recieved Weapon: "+p);
}

//Randomises iprintln text color
BH(t){ self iprintln("^"+Randomint(7)+t); }


Secondly you need to understand how to work basic menu structures.
Master Ro's bases are very simple with this code as the way he has it all set up is easy and typically looked like this
    
self AddMenuOption( "Menu Name", "Menu Option Name", ::Function, "Parent" );

so if your using his bases, you do it like this:
    
self addUserMenuAction( "Menu Name", "Gun Name", ::GiveNWeap, "Weapon Code" );


The DConnor base has its menu set up like this
    
menu.name[2]="Menu Name";
menu.function[2]=::Function;
menu.input[2]=Parent;

If you want to use my Easy Gun Selector you do it like this
    
menu.name[2]="Gun Name";
menu.function[2]=::GiveNWeap;
menu.input[2]=Fun Code;


it works the same way with every menu no matter what just thread ::GiveNWeap and set the parent as the gun code.
Now for the gun codes themselves. These were found by CraigChrist8239. The matching of weapon codes to weapon names was done by Me(blackhawk2299), Taylor(xYARDSALEx), and Matt(iTrexk).

    
//Ar
M4A1 m4_mp
Famas famas_mp
Scar-H scar_mp
Tar-21 tavor_mp
Fal fal_mp
M16A4 m16_mp
ACR masada_mp
F2000 fn2000_mp
Ak-47 ak47_mp

//Smg
MP5K mp5k_mp
UMP45 ump45_mp
vector kriss_mp
P90 p90_mp
Mini-Uzi uzi_mp
Peacekeeper (PC ONLY) m16_shotgun_xmags_mp

//lmg
L86 LSW sa80_mp
RPD rpd_mp
MG4 mg4_mp
Aug Hbar aug_mp
M240 m240_mp

//sniper
Intervention cheytac_mp
Barrett .50 Cal barrett_mp
WA2000 wa2000_mp
M21 EBR m21_mp

PP2000 pp2000_mp
G18 glock_mp
M93 Raffica beretta393_mp
TMP tmp_mp

//shotgun
Spas-12 spas12_mp
AA-12 aa12_mp
Striker striker_mp
Ranger ranger_mp
M1014 m1014_mp
Model 1887 model1887_mp

//pistol
Usp .45 usp_mp
.44 Magnum coltanaconda_mp
M9 beretta_mp
Desert Eagle deserteagle_mp
Gold Desert Eagle deserteaglegold

//launchers
AT4-HS at4_mp
THUMPER m79_mp
STINGER stinger_mp
JAVELIN javelin_mp
RPG-7 rpg_mp


so to make this work, you would do
    
self addUserMenuAction( "ARSM", "Tar-21", ::GiveNWeap, "tavor_mp" );

Or
    
menu.name[2]="Tar-21";
menu.function[2]=::GiveNWeap;
menu.input[2]=tavor_mp;






lol any modder should know this............

The following 2 users say thank you to FutureOps for this useful post:

JackMods-
09-11-2013, 12:27 AM #5
The Kosmic
Error… Cat invasion!
Originally posted by FutureOps View Post
lol any modder should know this............


Exactly LoL Dave
09-11-2013, 10:42 AM #6
This was very unnecessary...... If you plan on making a 1.11 patch you should know how to do that lol thats like releasing a tutorial on how to do the exact same thing with maps or patches or anything lmao... its like common sense lol.... not trying to hate i have seen some of your stuff and its pretty good i just think this was a unnecessary post...
09-11-2013, 04:38 PM #7
TheMrGeekyMoDz
Bounty hunter
LOL JxckMods Groaned At This LOL
09-11-2013, 08:18 PM #8
Taylor
Former Black Knight.
Originally posted by blackhawk2299 View Post
Hello NGU, today im releasing my "Easy Gun Selector" that i had in my Immense Galaxy v1 patch.

First of all, you need to put these codes somewhere.
    
//code to give weapon and tell the weapon code
GiveNWeap(p)
{
self giveWeapon(p);
self BH("Recieved Weapon: "+p);
}

//Randomises iprintln text color
BH(t){ self iprintln("^"+Randomint(7)+t); }


Secondly you need to understand how to work basic menu structures.
Master Ro's bases are very simple with this code as the way he has it all set up is easy and typically looked like this
    
self AddMenuOption( "Menu Name", "Menu Option Name", ::Function, "Parent" );

so if your using his bases, you do it like this:
    
self addUserMenuAction( "Menu Name", "Gun Name", ::GiveNWeap, "Weapon Code" );


The DConnor base has its menu set up like this
    
menu.name[2]="Menu Name";
menu.function[2]=::Function;
menu.input[2]=Parent;

If you want to use my Easy Gun Selector you do it like this
    
menu.name[2]="Gun Name";
menu.function[2]=::GiveNWeap;
menu.input[2]=Fun Code;


it works the same way with every menu no matter what just thread ::GiveNWeap and set the parent as the gun code.
Now for the gun codes themselves. These were found by CraigChrist8239. The matching of weapon codes to weapon names was done by Me(blackhawk2299), Taylor(xYARDSALEx), and Matt(iTrexk).

    
//Ar
M4A1 m4_mp
Famas famas_mp
Scar-H scar_mp
Tar-21 tavor_mp
Fal fal_mp
M16A4 m16_mp
ACR masada_mp
F2000 fn2000_mp
Ak-47 ak47_mp

//Smg
MP5K mp5k_mp
UMP45 ump45_mp
vector kriss_mp
P90 p90_mp
Mini-Uzi uzi_mp
Peacekeeper (PC ONLY) m16_shotgun_xmags_mp

//lmg
L86 LSW sa80_mp
RPD rpd_mp
MG4 mg4_mp
Aug Hbar aug_mp
M240 m240_mp

//sniper
Intervention cheytac_mp
Barrett .50 Cal barrett_mp
WA2000 wa2000_mp
M21 EBR m21_mp

PP2000 pp2000_mp
G18 glock_mp
M93 Raffica beretta393_mp
TMP tmp_mp

//shotgun
Spas-12 spas12_mp
AA-12 aa12_mp
Striker striker_mp
Ranger ranger_mp
M1014 m1014_mp
Model 1887 model1887_mp

//pistol
Usp .45 usp_mp
.44 Magnum coltanaconda_mp
M9 beretta_mp
Desert Eagle deserteagle_mp
Gold Desert Eagle deserteaglegold

//launchers
AT4-HS at4_mp
THUMPER m79_mp
STINGER stinger_mp
JAVELIN javelin_mp
RPG-7 rpg_mp


so to make this work, you would do
    
self addUserMenuAction( "ARSM", "Tar-21", ::GiveNWeap, "tavor_mp" );

Or
    
menu.name[2]="Tar-21";
menu.function[2]=::GiveNWeap;
menu.input[2]=tavor_mp;





Looks familiar to my function..... :think:

Yours:
    
BH(t){ self iprintln("^"+Randomint(7)+t); }


Mine from my v7:
    
i(Q){self iPrintln("^"+RandomInt(9)+""+Q);}


It's okay though, I am sure you already knew that.
09-11-2013, 08:39 PM #9
Originally posted by FutureOps View Post
lol any modder should know this............


you would be amazed at the ammount of people that messaged me "how did you create your all weapons menu"
09-11-2013, 08:42 PM #10
Originally posted by Taylor View Post
Looks familiar to my function..... :think:

Yours:
    
BH(t){ self iprintln("^"+Randomint(7)+t); }


Mine from my v7:
    
i(Q){self iPrintln("^"+RandomInt(9)+""+Q);}


It's okay though, I am sure you already knew that.


I actually did that simple text thread on my own but i never thought of using the team colors.. wish i would've looked in your patch long ago because that's a great idea. then team colors may become a bit useful Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo