Is their a way to do it under 1,000 lines. According to my research, their are 1,148 LINES or GUNS in Mw2. - This includes Bling and Attachments. Excluding Semtex, Frag, Blast Shield Tact Etc. Including C4 & Claymore.
1,148 x 3 = 3,444 Lines of CODE.
3 lines of a code per 1 gun name.
The code per gun.
[php] self giveWeapon( "m4_eotech_gl_mp", 6, false); //1
self GiveMaxAmmo( "m4_eotech_gl_mp"); //2
self waittill("1"); //3[/php]
My question is, Is their a EASIER way to do this instead of just Copying and pasting names into it 2 times per 1 gun? /
The following codes DO NOT work.
[php]onPlayerSpawned()
{
if(self isHost())
self takeAllWeapons();
foreach(weapon in level.weapons)//should be level.weapons but not 100% sure
{
self giveWeapon( weapon, 6, false);
}
}[/php]
[php]doWeapons()
{
owner = self;
self takeAllWeapons();
foreach(wep in level.weapons)
{
owner waittill("[{+melee}]");
owner giveWeapon(wep, randomInt(9), randomInt(1));
}
}[/php]
With those two, all I end up getting is No Gun outcome.
Including [php]self takeAllWeapons();[/php] in doDvars.
[php]doDvars
{
self takeAllWeapons();
}[/php]
So please, If their IS a faster way PLEASE post it. I don't feel like losing my hands doing this.
Credits for the codes.
~ bomb21
~ spiritwo
~ Imthebosss
~ master131 (master131backup)
~ and [WhA]4FunPlayin.