core.plugins.tesla_charger.entities.cityrp_tesla_supercharger.init
Tesla Supercharger (server)
Server logic for the public Tesla Supercharger: charges electric vehicles (billing the driver when present), drains and reports stolen vehicles, and drives the charger's status skins.
- ServerENT:ChargeUnattendedVehicle(veh)Source ☍
-
Charges a driverless vehicle for free, provided it is claimed by this charger.
Parameters
- vehEntityThe parked vehicle.
- ServerENT:HandleImproperParking(veh)Source ☍
-
Tops up a badly parked vehicle only while it is nearly flat, and nags its owner.
Parameters
- vehEntityThe badly parked vehicle.
- ServerENT:HandleStolenVehicle(veh)Source ☍
-
Alerts government players and the registered owner that a stolen vehicle is here, once per vehicle.
Parameters
- vehEntityThe stolen vehicle.
- ServerENT:ProcessVehicleEntity(veh)Source ☍
-
Drains a stolen vehicle or charges an unattended one, then updates the skin.
Parameters
- vehEntityThe nearby vehicle to process.
- ServerENT:SetNormalSkin(veh)Source ☍
-
Shows the charged or charging skin for a vehicle that is not stolen.
Parameters
- vehEntityThe vehicle being serviced.
- ServerENT:SetStolenSkin()Source ☍
-
Alternates the two red skins so the charger reads as flashing.
- ServerENT:UpdateSkinForVehicleState(veh)Source ☍
-
Picks the stolen-alert or normal skin for the vehicle currently being serviced.
Parameters
- vehEntityThe vehicle being serviced.