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-11-2013, 08:49 PM #11
Almost all patches have a weapons selection in them including mine.
Try coming up with something nobodies done before.
09-11-2013, 09:21 PM #12
Taylor
Former Black Knight.
Originally posted by blackhawk2299 View Post
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


I have no clue what you are talking about when you say team colors :|
09-11-2013, 09:44 PM #13
Originally posted by Taylor View Post
I have no clue what you are talking about when you say team colors :|


He Might be talking about the team color dvars which I can't remember them right now. I could be wrong.
09-12-2013, 03:44 AM #14
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.

Facepalm
09-12-2013, 08:02 PM #15
Originally posted by Taylor View Post
I have no clue what you are talking about when you say team colors :|


^8 and ^9 represent team colors, so if you have a colored killfeed, it would also change the text with ^8/9
like if you had this dvar set "g_teamcolor_Axis R G B A", you could have custom iprintln/iprintlnbold text.
i made my whole v5.5 in the ^8 and ^9's so the menu colors were customizable.
09-12-2013, 08:04 PM #16
Originally posted by codybenti View Post
Almost all patches have a weapons selection in them including mine.
Try coming up with something nobodies done before.


And no. maybe modded gun selection but i've never seen one that had all the normal weapons & modded weapons.
09-13-2013, 01:09 AM #17
ByteSource
League Champion
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;





your releasing shit that we dont even need lol. this is been out for time, BTW all you did is list weapon codes and added a random color code to show up when ever you select a weapon. dont be wasting peoples time looking over something stupid and easy. JUST STOP after you released your v6 ( ill admit i liked it a lil) you became shitty and useless all the things you made and recent patches made are shit not 10% good. just mod with other peoples creations
10-23-2013, 11:02 PM #18
????????????????????????


Choco

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo