cityrp_govlocker
Government locker entity, client half: the equipment menu, built from the player's kit in the loadouts plugin and the prices the server sends with it.
- ServerENT:AcceptInput(inputName, activator)Source ☍
-
Opens the locker menu for a player who uses it, with what each option costs them.
Parameters
- inputNamestring
- activatorEntity
- ServerENT:CanEquip(ply) → booleanSource ☍
-
Whether a player is in a state to use this locker at all: alive, free and within reach.
Parameters
- plyPlayer
Returns
- boolean
- ClientENT:DrawHalo(alpha)Source ☍
-
Outlines the locker for a player who can equip from it.
Parameters
- alphanumber
- SharedENT:GetLockerKit(ply) → LoadoutKit?Source ☍
-
The kit a player equips from this locker with, or nil when their job has none.
Parameters
- plyPlayer
Returns
- ClientENT:ListOptions(kit, prices) → GovLockerEntry[]Source ☍
-
Lists a kit's locker options in the order the server priced them.
Parameters
- kitLoadoutKit
- pricesnumber[]
Returns
- ClientENT:LockerMenu(kit, prices, rep, hasModelOverride)Source ☍
-
Opens this locker's equipment menu for the player's department. is set for the player's team -- the Uniform column is dropped in that case, since none of its options' model swaps should be allowed to override the mandated default model.
Parameters
- kitLoadoutKitThe kit the player equips with;
kit.lockernames the department. - pricesnumber[]What each option costs the player, in
ListOptionsorder. - repnumberThe player's REP, gating options that carry a
minRep. - hasModelOverrideboolean?True if an Assistant+ job default model (core/plugins/teamname)
- kitLoadoutKitThe kit the player equips with;
- ServerENT:ReadPicks(kit, slotOrder) → table<string, string[]>?Source ☍
-
Reads the picks a player sent from the menu, as
{slot index, option index}pairs, into the option namesEquipFromLockertakes.Parameters
- kitLoadoutKit
- slotOrderstring[]
Returns
- table<string, string[]>?Nil when a pair names nothing the kit offers.
One option as the menu lists it.
- ClientGovLockerEntry.optionSource ☍
-
One thing the locker offers in a slot.
- ClientGovLockerEntry.optionIndexSource ☍
-
The option's position in its slot.
- ClientGovLockerEntry.priceSource ☍
-
What the server says it costs this player.
- ClientGovLockerEntry.slotIndexSource ☍
-
The slot's position in the plugin's
slotOrder. - ClientGovLockerEntry.slotNameSource ☍