This triggers the same event called when crashing a vehicle, picking a random part to damage
Example Usage:
HasHarness
Retrieves if the user currently has a harness buckled while in a car
Example Usage:
seatBeltOn
Retrieves if the user currently has a seatbelt buckled while in a car
Example Usage:
GetNosLevel
Retrieves the current Nos status of a vehicle
Example Usage:
GetInPreview
When a player uses /preview or /previewrgb this toggles a variable to stop users doing anything else to it leading to exploits, this can be called outside of the script to stop other scripts from allowing exploits during this process
Example Usage
updateVehicle
Simply, complies the vehicle status table to save it to the database on command
Example Usage
GetMilage
Example Usage
This retreives the raw value of the milage from the database
IsVehicleOwned
Example Usage:
Checks the database for if the plate is attached to an owned vehicle
Server Exports
GetMilage
Example Usage
This retreives the raw value of the milage from the database
IsVehicleOwned
Example Usage:
Checks the database for if the plate is attached to an owned vehicle
local vehicle = GetVehiclePedIsIn(PlayerPedId())
exports["jim-mechanic"]:DamageRandomComponent(vehicle)
local harnessOn = exports["jim-mechanic"]:HasHarness()
local seatbeltOn = exports["jim-mechanic"]:seatBeltOn()
local vehicle = GetVehiclePedIsIn(PlayerPedId())
local nosLevel, hasNos = exports["jim-mechanic"]:GetNosLevel(vehicle)
print("Vehicle Nos Status:", tostring(hasNos))
print("Current Nos Level:", tostring(nosLevel))
local inPreview = exports["jim-mechanic"]:GetInPreview()
print("Player preview mode:", tostring(inPreview))
local vehicle = GetVehiclePedIsIn(PlayerPedId())
exports["jim-mechanic"]:updateVehicle(vehicle)
local milage = exports["jim-mechanic"]:GetMilage(plate)
print("Current Milage:" tostring(milage))
local owned = exports["jim-mechanic"]:IsVehicleOwned(plate)
if owned then
print("This vehicle is owned")
else
print("This vehicle is NOT owned")
end
local milage = exports["jim-mechanic"]:GetMilage(plate)
print("Current Milage:" tostring(milage))
local owned = exports["jim-mechanic"]:IsVehicleOwned(plate)
if owned then
print("This vehicle is owned")
else
print("This vehicle is NOT owned")
end