Module core.plugins.licenseplates.sv_init
License Plates Server
Module Overview
Functions
| DetachPlate(ply, veh) | Gives a player a detached plate item, and replaces current vehicle plate with a random one |
| AttachPlate(ply, meta) | Attaches a plate item to a vehicle |
| GetVehicleName(veh) | Get the registration name of a vehicle from the entity. |
| CheckIsAutoGen(meta) | Check if a vehicle plate is an autogenerated one |
| SetPlateInfo(ply, vehicle, pserial, autogen) | Update a player with a new plate. |
| GetPlateInfo(player, vehicle) | Get license plate information from a player. |
| SetupVehiclePlates(ply, veh) | Setup a player's vehicle. |
| OpenMenu(player) | Open the license plate menu on a player. |
- DetachPlate(ply, veh)
-
Gives a player a detached plate item, and replaces current vehicle plate with a random one
Parameters:
- ply Player calling detach
- veh Vehicle being targeted
- AttachPlate(ply, meta)
-
Attaches a plate item to a vehicle
Parameters:
- ply Player using the item
- meta The plate item's meta info
Returns:
-
boolean Successful or not
- GetVehicleName(veh)
-
Get the registration name of a vehicle from the entity.
Parameters:
- veh Vehicle entity.
Returns:
-
string Registration name.
- CheckIsAutoGen(meta)
-
Check if a vehicle plate is an autogenerated one
Parameters:
- meta Vehicle meta
Returns:
-
boolean true or false
- SetPlateInfo(ply, vehicle, pserial, autogen)
-
Update a player with a new plate.
Parameters:
- ply The player to update.
- vehicle Player's vehicle type to update.
- pserial The new license plate.
- autogen Boolean for if the serial is an autogenerated one or not
- GetPlateInfo(player, vehicle)
-
Get license plate information from a player.
Generates a new license if one exists.
Parameters:
- player The player (or steamid) to get.
- vehicle The Vehicle item ID to get.
Returns:
-
The license plate information.
- SetupVehiclePlates(ply, veh)
-
Setup a player's vehicle.
Parameters:
- ply The player setting up the vehicle.
- veh The vehicle to set up.
- OpenMenu(player)
-
Open the license plate menu on a player.
Parameters:
- player The player to open the menu on.