Methods used to manage and manipulate weapons
Clears the outstanding weapon purchase and loadout failure retry timers.
Realm: Server
Added in: 1.8.2
Clears the weapon lists used by the roleweapons system.
Realm: Server
Added in: 1.9.4
Toggle's the player's disguise, if they have one.
NOTE: This method was not added by Custom Roles for TTT, but was modified to allow any player with the disguise equipment to use this functionality. In unmodified TTT, this method is restricted to traitors only.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Checks whether the role has weapons or equipment available in their shop.
Realm: Client and Server
Added in: 1.0.0
Parameters:
ROLE_DETECTIVE
weapons and equipment should also be checked (Added in 1.3.6)
Updates the CanBuy
property of the given weapon to only include weapons that the provided role is allowed to purchase based on all of the parameters.
Realm: Client and Server
Added in: 1.0.0
Parameters:
CanBuy
property is being updatedBuyables
, Excludes
, and NoRandoms
. Pass `false` to explicitly ignore the currently applied role pack, if there is one. (Optional, if not provided then the currently applied role pack weapons will be used automatically if there are any) (Added in 2.0.7)
Handles loading the roleweapons configuration from the server data files.
Realm: Server
Added in: 1.8.8
Parameters:
Checks whether the player has the required weapons or equipment for wep.
Realm: Client and Server
Added in: 2.0.4
Parameters:
Prepares the roleweapons lists for the provided role.
Realm: Client and Server
Added in: 1.0.0
Parameters:
Resets the cache of the role weapon overrides.
Realm: Server
Added in: 1.0.0
Resets the cache of the role weapon overrides and resets all changed weapon CanBuy properties back to their defaults.
Realm: Server
Added in: 1.0.0
Updates the roleweapons lists for the provided role and weapon.
Realm: Client and Server
Added in: 1.9.4
Parameters:
weapon
should be in the WEPS.BuyableWeapons listweapon
should be in the WEPS.ExcludeWeapons listweapon
should be in the WEPS.BypassRandomWeapons listweapon
should be in the WEPS.LoadoutWeapons list (Added in 2.1.11)