ItsMods

Full Version: Obtain weapons and perks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[hide]Obtain a weapon:

Code:
self giveWeapon("weapon_mp");

Switch to Weapon:

Code:
self switchToWeapon("weapon_mp");

Set Spawn Weapon:

Code:
self setSpawnWeapon("weapon_mp");

Take Weapon:

Code:
self takeWeapon("weapon_mp");
or
Code:
self takeAllWeapons();

Set Weapon ammo:

Code:
self setWeaponAmmoStock("weapon_mp", amount of ammo);
or
Code:
self giveMaxAmmo("weapon_mp");

Set Weapon Options:

Code:
self giveWeapon("weapon_mp", 0, self calcWeaponOptions( CamoNumber, LensNumber, ReticleNumber, ClantagNumber, EmblemNumber) );

Code:
Camoes:       Reticle:                      Lens:                  ClanTag:   Emblem:
0 = None//////0 = Dot///////////////////////0 = Clear Lens/////////0 = No//////0 = No
1 = Dusty/////1 = Semi Circles//////////////1 = Red Lens///////////1 = Yes/////1 = Yes
2 = Ice///////2 = Lines With Dot////////////2 = Blue Lens
3 = Red///////3 = Hollow Circle/////////////3 = Green Lens
4 = Olive/////4 = Smiley Face///////////////4 = Orange Lens
5 = Nevada////5 = Arrows Vertical///////////5 = Yellow Lens
6 = Sahara////6 = Arrows Horizontal
7 = ERDL//////7 = Arrows With Dot
8 = Tiger/////8 = Bones
9 = Berlin////9 = Burst
10 = Warsaw///10 = Circle Within A Circle
11 = Siberia//11 = Circle
12 = Yuhon////12 = Circle Outline
13 = Woodland/13 = Circle Outline With Dot
14 = Flora////14 = Circle with Crosshairs
15 = Gold/////15 = Circle with Outer Lines
//////////////16 = Circle With Inner Lines
//////////////17 = Circle With Arrows
//////////////18 = Circle with Triangles
//////////////19 = Outer Crosshairs
//////////////20 = Small Crosshairs
//////////////21 = Large Crosshairs
//////////////22 = Crosshairs
//////////////23 = Crosshairs With A Dot
//////////////24 = Diamond
//////////////25 = Diamond Outline
//////////////26 = Heart
//////////////27 = Radiation
//////////////28 = Skull
//////////////29 = Square
//////////////30 = Square Outline
//////////////31 = Square with Crosshairs
//////////////32 = Star
//////////////33 = Three Dots
//////////////34 = Treyarch
//////////////35 = Triangle
//////////////36 = Outer Triangles
//////////////37 = X
//////////////38 = X With Dot
//////////////39 = Yin Yang

Example:

Quote:self giveWeapon("m16_reflex_mp", 0, self calcWeaponOptions( 15, 34, 3, 1, 1 ) );
self giveMaxAmmo("m16_reflex_mp");

Get Perk:

Code:
self setPerk("perk");

Clear Perks:

Code:
self clearPerks();

Example:

Quote:self clearPerks();
self setPerk("specialty_movefaster");

All Weapon names: (thanks to @d0h!)
[attachment=1038]

All Perk names: (don't know who made this)
[attachment=1039]
[/hide]
Nice.. but this aint the tutorial section
And the meat reticle in zombies?
(08-30-2011, 19:07)iAegle Wrote: [ -> ]Nice.. but this aint the tutorial section

doesn't really look like a tutorial for me
it are just some codes Tongue
also you forgot

set the weapon someone spawns with:
Code:
self setSpawnWeapon( "weapon_mp" );

and this is wrong:
Code:
self setWeaponAmmoStock("weapon_mp");
should be
Code:
self setWeaponAmmoStock("weapon_mp", amount of ammo );
(08-30-2011, 19:10)iAegle Wrote: [ -> ]also you forgot

set the weapon someone spawns with:
Code:
self setSpawnWeapon( "weapon_mp" );

and this is wrong:
Code:
self setWeaponAmmoStock("weapon_mp");
should be
Code:
self setWeaponAmmoStock("weapon_mp", amount of ammo );

shit, thanks for saying xD
(08-30-2011, 19:08)Lemon Wrote: [ -> ]And the meat reticle in zombies?

(08-30-2011, 19:12)Lemon Wrote: [ -> ]
(08-30-2011, 19:08)Lemon Wrote: [ -> ]And the meat reticle in zombies?

i don't think thats in multiplayer xD
probably late to the game but I'm tweaking Cyborg's AI mod and added several new purchaseable weapons/perks. Only problem is, I can't seem to set the max ammo of the weapons.

I'm using the following snippet:

Code:
else if( response == "buy_commando")
        {
            if (self.money >= 250)
            {
                self playSoundToPlayer("zmb_cha_ching", self);
                self closeMenu( game[ "modmenu1" ] );
                self giveWeapon("commando_dualclip_mp");  
                self.money -= 250;
                self setWeaponAmmoStock("commando_dualclip_mp",720);
                self.hud_score_value setValue(self.money);              
                self thread maps\mp\gametypes\aico::ScoreHUD( -250 );
                self playSoundToPlayer("zmb_cha_ching", self);
                self iPrintln("Commando purchased");
                
            }
            else
                self playSoundToPlayer("zmb_no_cha_ching", self);
        }

it'll give me the weapon and take 250 "points" from the player, but never gives them more than the 240/120 ammo.

any ideas?
(09-02-2012, 20:25)wise Wrote: [ -> ]probably late to the game but I'm tweaking Cyborg's AI mod and added several new purchaseable weapons/perks. Only problem is, I can't seem to set the max ammo of the weapons.

I'm using the following snippet:

Code:
else if( response == "buy_commando")
        {
            if (self.money >= 250)
            {
                self playSoundToPlayer("zmb_cha_ching", self);
                self closeMenu( game[ "modmenu1" ] );
                self giveWeapon("commando_dualclip_mp");  
                self.money -= 250;
                self setWeaponAmmoStock("commando_dualclip_mp",720);
                self.hud_score_value setValue(self.money);              
                self thread maps\mp\gametypes\aico::ScoreHUD( -250 );
                self playSoundToPlayer("zmb_cha_ching", self);
                self iPrintln("Commando purchased");
                
            }
            else
                self playSoundToPlayer("zmb_no_cha_ching", self);
        }

it'll give me the weapon and take 250 "points" from the player, but never gives them more than the 240/120 ammo.

any ideas?
It'll always give as much ammo as the max ammo. If you want to increase the max ammo you'd want to create a custom version of the commando.
Pages: 1 2