GSC reference › Built-in
UseBuildKitWeaponModel()
Built-in (engine)
Server
Use a build kit weapon model
Signature
UseBuildKitWeaponModel(<player>, <weapon>, [camoIndex], [upgraded])
Parameters
| Name | Required? | Details |
|---|---|---|
| player | Required | The player whose build kit data will be used |
| weapon | Required | The weapon to base the build kit on |
| camoIndex | Optional | The index of the camo to override the build kit's camo with |
| upgraded | Optional | bool whether this should be the upgraded version. If so extclip and fmj will be added |
Example (from Treyarch's docs)
wall_weapon_model UseBuildKitWeaponModel( player, magicbox.weapon )
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_utility.csc, line 145
weapon_model usebuildkitweaponmodel(localclientnum, weapon, camo, zm_weapons::is_weapon_upgraded(weapon)); - scripts/zm/_zm_utility.gsc, line 4558
weapon_model usebuildkitweaponmodel(player, weapon, camo, upgraded);
Related built-ins
- GetBuildKitWeapon()Get weapon object (including attachments) for the weapon from the player's build kit
- GetBuildKitWeaponOptions()Get weapon options for the weapon from the player's build kit
- UseWeaponModel()Use a weapon model
- GetBuildKitAttachmentCosmeticVariantIndexes()Get attachment cosmetic variant indexes for the weapon from the player's build kit
- GetWeaponWorldModel()Returns weaopn world model
- GetTopPlayersWeaponModel()Returns the name of the equipped weapon model of the top player in the game by index
- GetWeaponModelForCharacter()Returns the name of the weapon model of at the given index
- GetWeapon()Get the requested weapon object based on game mode agnostic weapon name string
- SetModel()Set the model for the entity
- GetCurrentWeapon()Gets the current player weapon
- SetUIModelValue()Sets a UIModel from the model being passed in.
- GiveWeapon()Give a weapon to the player
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).