CityRP Documentation Repository

core.plugins.licenseplates.sh_init

License Plates Shared

Functions

SharedCopyVehiclePlateFollowFields(dest, src) → tableSource ☍

Copies follow-lean options from one plate table onto another.

Parameters

  • desttableDestination plate table.
  • srctableSource plate table.

Returns

  1. tableThe destination table.
SharedGetRegisteredVehiclePlateNames() → string[]Source ☍

Returns every vehicle name that has registered plate offsets. Used by the developer layout editor to copy plates from another car.

Returns

  1. string[]Sorted list of RegisterVehiclePlates keys.
SharedGetVehiclePlates(vname) → unknownSource ☍

Get a set of vehicle plates from the registered name.

Parameters

  • vnameanyThe name to check again.

Returns

  1. unknownNumeric list of license plate positions.
SharedGetVehiclePlateWorldTransform(veh, pinfo, pos, ang) → Vector, AngleSource ☍

World position and angles for a plate, including optional visual lean. pos / ang stay entity-local. followLean rolls around plate local +Y (front/back), which is the bike's lean axis — not Angle:Forward().

Parameters

  • vehEntityThe vehicle the plate is drawn on.
  • pinfoVehiclePlateInfoPlate definition (followLean / bone / leanScale).
  • posVectorEntity-local plate position, after any condition override.
  • angAngleEntity-local plate angles, after any condition override.

Returns

  1. 1Vector
  2. 2Angle
SharedRegisterVehiclePlates(vname, _)Source ☍

Register a vehicle with the license plates system.

Parameters

  • vnameanyThe name to register the vehicle under.
  • unknown

Fields

SharedDistanceFadeSource ☍

Plugin configuration. Cut off distance

SharedOldTableNameSource ☍

Previous sqlite table we're migrating from

SharedPlateTextColorSource ☍

Color of text on plate

SharedTableNameSource ☍

Sqlite table name

VehiclePlateInfo

7 fields Source ☍

A registered license-plate offset.

SharedVehiclePlateInfo.angSource ☍

Entity-local plate angles.

SharedVehiclePlateInfo.boneSource ☍

Optional bone used only to read extra roll, never as a parent.

SharedVehiclePlateInfo.conditionSource ☍
SharedVehiclePlateInfo.followLeanSource ☍

Follow the visual chassis lean (motorcycles, etc.).

SharedVehiclePlateInfo.leanScaleSource ☍

Max lean in degrees at full steer. Default 32. Negative flips side.

SharedVehiclePlateInfo.posSource ☍

Entity-local plate position.

SharedVehiclePlateInfo.scaleSource ☍

3D2D scale.