NOTE: This is an archive of the old wiki.
Expect content to be outdated and links to be broken.

User Tools


obsolete:lua:lua_givenamedweapon

Lua GiveNamedWeapon

void GiveNamedWeapon( int playerIndex, string weaponName, int extraAmmo, bool noDefaultAmmo );

Description

Gives a player a weapon. The name is the short name for that weapon (without the “weapon_” part); extra ammo is the ammount of ammo you want to give to the player at the same time and noDefaultAmmo will remove extra ammo given when the item is given (for example remove the extra grenades when one is given).

Version

Beta 3.1

Example

<lua> GiveNamedWeapon( playerIndex, “knife” ); GiveNamedWeapon( playerIndex, “grenade”, 1, true ); GiveNamedWeapon( playerIndex, “ar33”, 90 ); </lua>

obsolete/lua/lua_givenamedweapon.txt · Last modified: 2023/09/03 18:43 by 127.0.0.1