e2 docs weapon - wiremod/wire GitHub Wiki
Weapon
=
:weapon()
Returns the weapon that player E is currently holding (2 ops)
=
:weapon(
Weaponclassname)
Returns the weapon with specified class of player E (2 ops)
=
:hasWeapon(
Classname)
Returns 1 if player E has a weapon with class S, 0 otherwise (2 ops)
=
:weapons()
Returns the weapons that player E has (2 ops)
=
:primaryAmmoType()
Returns the name of the primary weapon's ammo (2 ops)
=
:secondaryAmmoType()
Returns the name of the secondary weapon's ammo (2 ops)
=
:ammoCount(
Ammo_type)
Returns the amount of stored ammo of type S on player E, excluding current clip (2 ops)
=
:clip1()
Returns the amount of ammo in the primary clip of weapon E, -1 if there is no primary clip (2 ops)
=
:clip1Size()
Returns the maximum size of the primary clip (2 ops)
=
:setClip1(
Amount)
Sets the amount of ammo in the primary clip of weapon E. Requires wire_expression2_weapon_ammo_set_enable to be set to 1. (2 ops)
=
:clip2()
Returns the amount of ammo in the secondary clip of weapon E, -1 if there is no secondary clip 1) (2 ops)
=
:clip2Size()
Returns the maximum size of the secondary clip (2 ops)
=
:setClip2(
Amount)
Sets the amount of ammo in the secondary clip of weapon E. Requires wire_expression2_weapon_ammo_set_enable to be set to 1. (2 ops)
=
:tool()
returns the name of the tool the player E is currently holding (2 ops)
=
:giveWeapon(
Classname)
Gives player E the weapon with class S. Requires wire_expression2_weapon_give_enable to be set to 1. (2 ops)
=
:giveWeapon(
Classname,
Noammo)
Gives player E the weapon with class S. If N is not 0, the weapon will be given with full ammo. Requires wire_expression2_weapon_give_enable to be set to 1. (2 ops)
:selectWeapon(
Classname)
Sets the active weapon with class S on player E (2 ops)
=
:giveAmmo(
Amount,
Type)
Gives the player E N amount of ammo of type S. Requires wire_expression2_weapon_ammo_give_enable to be set to 1. (2 ops)
=
:giveAmmo(
Amount,
Type,
Hidepopup)
Gives the player E N amount of ammo of type S. If N is not 0, the pop-up will not appear. Requires wire_expression2_weapon_ammo_give_enable to be set to 1. (2 ops)
:setAmmo(
Ammocount,
Type)
Sets the amount of ammo of type S on player E to N. Requires wire_expression2_weapon_ammo_set_enable to be set to 1. (2 ops)
:removeAmmo(
Ammocount,
Type)
Removes N amount ammo of type S from player E. Requires wire_expression2_weapon_ammo_set_enable to be set to 1. (2 ops)
:removeAllAmmo()
Removes all ammo from the player E. Requires wire_expression2_weapon_ammo_set_enable to be set to 1. (2 ops)
:stripWeapon(
Classname)
Removes the weapon with class S from player E. Requires wire_expression2_weapon_strip_enable to be set to 1. (2 ops)
:stripWeapons()
Removes all weapons from player E. Requires wire_expression2_weapon_strip_enable to be set to 1. (2 ops)