(adsbygoogle = window.adsbygoogle || []).push({});
NOTE: Firstly all the 'good' or more experienced modders will know this and it is very old, it is simply for the newer coders to learn off.
I've been looking in some other peoples W@W and COD4 patches and i still see people doing this when they give a weapon and they do this for every weapon they want to give.
GiveWeapon()
{
self giveWeapon( "WEAPONNAME_mp", 0, false );
}
However you can shorten this very easily using this function:
GiveWep(Weapon)
{
self giveWeapon( Weapon, 0, false );
}
You simple do this:
Function = GiveWep
Input = "WEAPONNAME_mp"
Example using Karoolus' menu base:
self.option[0][0] = "Default Weapon";
self.function[0][0] = ::GiveWep;
self.opt[0][0] = "defaultweapon_mp";
So now instead of creating a new function for every weapon you wanna give you just use one leaving you with more space
.
.Choco's Version:
GiveGun(gun)
{
self setClientDvar("activeAction", "give "+gun);
}
Have a good day and enjoy
.
Weapons List:
You must login or register to view this content.
Press Ctrl + F and type [C035] to see all the weapon codes
.