cityrp.teslaCharger
Tesla Charger plugin (shared).
Shared definitions and entity helpers for the Homecharger and Supercharger price UI and owner billing workflow.
- Sharedcityrp.teslaCharger.ApplyEntityShared(ent)Source ☍
-
Applies shared NetworkVar and price accessors to a charger ENT table.
Parameters
- enttable
- Sharedcityrp.teslaCharger.BasePrice() → numberSource ☍
-
The configured base recharge cost, as a whole number.
Returns
- number
- Sharedcityrp.teslaCharger.GetHeading(ent) → stringSource ☍
-
Menu title for a charger entity.
Parameters
- entEntity
Returns
- string
- Servercityrp.teslaCharger.InitializePrice(charger)Source ☍
-
Sets a charger's default price to the configured base cost.
Parameters
- chargerEntity
- Sharedcityrp.teslaCharger.IsCharger(ent) → booleanSource ☍
-
Whether an entity is a player-owned Tesla charger.
Parameters
- entEntity|nilThe entity metatable, with CityRP's own additions to Garry's Mod's
Entity.
Returns
- boolean
- entEntity|nilThe entity metatable, with CityRP's own additions to Garry's Mod's
- Sharedcityrp.teslaCharger.MaxPrice() → numberSource ☍
-
The maximum price an owner may set, as a whole number.
Returns
- number
- Servercityrp.teslaCharger.OpenPriceUI(ply, charger)Source ☍
-
Opens the owner price UI for a charger, if the player may configure it.
Parameters
- Sharedcityrp.teslaCharger.CLASSESSource ☍