CityRP Documentation Repository

core.plugins.vehicles.cl_init

Clientside Vehicles Plugin.

Functions

Clientcityrp.vehicles.GetDisplayName(vehicle) → stringSource ☍

Returns a vehicle's display name scoped to what the local player is allowed to know: the bare car name with no access, "Your <car>" for the owner, or "<owner>'s <car>" for anyone else VehicleAccess grants (family/team/clan/etc). Access is private server-only state, so this is asked for per vehicle (cached and throttled) rather than trusted from a broadcast NWVar, which could only ever show the same string to every viewer at once.

Parameters

  • vehicleEntityTarget vehicle.

Returns

  1. stringAccess-scoped display name.
ClientDoVehicleVeiw(ply, origin, angles, fov) → table|nilSource ☍

Build the vehicle CalcView camera for ModView cars. Zoom is clamped clientside so scrolling past the server max does not rubber-band.

Parameters

  • plyPlayerLocal player.
  • originVectorEngine eye origin.
  • anglesAngleView angles.
  • fovnumberField of view.

Returns

  1. table|nilCamData override, or nil to leave the view alone.
ClientGetPetrolIcon() → stringSource ☍

Returns

  1. string
ClientGetVoltIcon() → stringSource ☍

Returns

  1. string

Fields

Clientcityrp.vehiclesSource ☍