Server
Server-sided exports
TrimPlate
Trims a given plate.
Parameters
plate
(string) – The vehicle number plate.
Returns
string
– The trimmed plate.
IsPlayerEmployee
Checks if player is an employee of a specific shop or any shop.
Parameters
src
(number) – The player source.shopId?
(number) – The ID of the shop you check for. If shopId is nil, it checks all shops.
Returns
boolean
–true
if employee, otherwisefalse
.number|nil
– If employee, then Shop ID is also returne, otherwisenil
.
RegisterVehicleData
Registers mileage, core- and service-parts data to database in t1ger_vehicledata table for a given plate. This can be used when purchasing a car from vehicleshop or using command to turn a vehicle into an owned one.
Parameters
plate
(string) – The plate of the vehicle.
SaveVehicleData
Saves the vehicle's vehicle-data for given vehicle entity in t1ger_vehicledata
table in database. Useful if u want to force save a vehicle's vehicle-data.
Parameters
vehicle
(integer) – The vehicle entity handle
Returns
boolean
–true
if saved succesfully, otherwisefalse
.
UpdateVehicleDataPlate
Updates a given plate in the t1ger_vehicledata
table to a new plate. Usefull if using fake plates or plate changer scripts and so on.
Parameters
currentPlate
(string) – The current plate to be replaced bynewPlate
newPlate
(string) – The new plate to replace with thecurrentPlate
Returns
boolean
–true
if updated succesfully, otherwisefalse
.
Last updated