CityRP Documentation Repository

core.plugins.licenseplates.sv_init

License Plates Server

Functions

ServerAttachPlate(ply, pos, meta) → boolean|nilSource ☍

Attaches a plate item to a vehicle

Parameters

  • plyanyPlayer using the item
  • posany
  • metaanyThe plate item's meta info

Returns

  1. boolean|nilSuccessful or not
ServerCheckIsAutoGen(meta) → booleanSource ☍

Check if a vehicle plate is an autogenerated one

Parameters

  • metaanyVehicle meta

Returns

  1. booleantrue or false
ServerDeletePlate(meta)Source ☍

Parameters

  • metaany
ServerDetachPlate(ply, veh)Source ☍

Gives a player a detached plate item, and replaces current vehicle plate with a random one

Parameters

  • plyanyPlayer calling detach
  • vehanyVehicle being targeted
ServerGetPlateInfo(player, vehicle) → string|unknown, unknown|nilSource ☍

Get license plate information from a player. Generates a new license if one exists.

Parameters

  • playeranyThe player (or steamid) to get.
  • vehicleanyThe Vehicle item ID to get.

Returns

  1. 1string|unknownlicense plate information.
  2. 2unknown|nil
ServerGetVehicleName(veh) → unknown|nilSource ☍

Get the registration name of a vehicle from the entity.

Parameters

  • vehanyVehicle entity.

Returns

  1. unknown|nilRegistration name.
ServerOpenMenu(player) → booleanSource ☍

Open the license plate menu on a player.

Parameters

  • playeranyThe player to open the menu on.

Returns

  1. boolean
ServerSetPlateInfo(ply, vehicle, pserial, autogen)Source ☍

Update a player with a new plate.

Parameters

  • plyanyThe player to update.
  • vehicleanyPlayer's vehicle type to update.
  • pserialanyThe new license plate.
  • autogenanyBoolean for if the serial is an autogenerated one or not
ServerSetupVehiclePlates(ply, veh, fake)Source ☍

Setup a player's vehicle.

Parameters

  • plyanyThe player setting up the vehicle.
  • vehanyThe vehicle to set up.
  • fakeany

Fields

ServerDelaySource ☍

Check if player has changed his plate recently.

ServerentSource ☍