JixelPatterns
  • JixelPatterns Documentation
  • Troubleshooting
    • Common Issues
    • Setting Up Locations
    • FAQ
  • Dependency
    • Jim_Bridge
      • Animal Ped Support
      • Script Helpers
      • Loader Functions
      • Callbacks
      • Cameras
      • Context Menus
      • Crafting
      • DrawText
      • Dui Functions
      • Input Creator
      • Inventories
      • Job Functions
      • Make Functions
      • Meta Handlers
      • Notifications
      • Phones
      • Player Functions
      • Poly Zones
      • Progress Bars
      • Scale Entity
      • Shops
      • Skillcheck
      • Society Banking
      • Stash Control
      • Targets
      • Vehicles
      • Wrapper Functions
      • Scaleforms
  • Paid Assets
    • Jim-Mechanic
      • Common Issues
      • Installation
      • Locations
        • Creating a Location
      • Exports
      • Nitrous
      • Harness + Seatbelt
      • Emergency Repair Bench
      • Odometer
      • Speedometer
      • Performance Mods
      • Preview System
      • Repair System
      • Car Lifts
      • Plate Change
      • Push Vehicle
      • Stancer Kit
      • Vehicle Seat Picker
    • Jim-Bakery
      • Installation
    • Jim-BeanMachine
      • Installation
    • Jim-BurgerShot
      • Installation
    • Jim-CatCafe
      • Installation
    • Jim-Henhouse
      • Installation
    • Jim-PizzaThis
      • Installation
    • Jim-Popsdiner
      • Installation
  • Free Assets
    • Jim-Mining
      • Installation
      • How To Use
        • Mining
        • Stone Washing
        • Gold Panning
    • Jim-Recycle
      • Installation
      • How To Use
        • Recycling
        • Dumpster Diving
        • Scrapping
    • Jim-Payments
      • Installation
      • How To Use
    • Jim-Shops
      • Installation
      • How To Use
    • Jim-Boarding
      • Installation
      • How To Use
    • Jim-Trains
      • Installation
      • How To Use
    • Jim-Consumbles
      • Installation
      • How To Use
    • Jim-DJBooth
      • Installation
      • How To Use
    • Jim-JobGarage
      • Installation
      • How To Use
    • Jim-Chairs
      • Installation
    • Jim-Notepad
      • Installation
      • How To Use
Powered by GitBook
On this page
  • Client Exports
  • GetVehicleStatus
  • SetVehicleStatus
  • DamageRandomComponent
  • HasHarness
  • seatBeltOn
  • GetNosLevel
  • GetInPreview
  • updateVehicle
  • GetMilage
  • IsVehicleOwned
  • Server Exports
  • GetMilage
  • IsVehicleOwned
  1. Paid Assets
  2. Jim-Mechanic

Exports

Client Exports

GetVehicleStatus

Retrieves a table of the extra damage components and status variables eg, harness

Example Usage:

local vehicle = GetVehiclePedIsIn(PlayerPedId())
local vehicleStatus = exports["jim-mechanic"]:GetVehicleStatus(vehicle)
print(json.encode(vehicleStatus , { indent = true })

SetVehicleStatus

Can be used to alter vehicle status variables, eg toggling harness on a vehicle or repairing extra damages

Example Usage:

local vehicle = GetVehiclePedIsIn(PlayerPedId())
exports["jim-mechanic"]:SetVehicleStatus(vehicle, "harness", 1)

DamageRandomComponent

This triggers the same event called when crashing a vehicle, picking a random part to damage

Example Usage:

local vehicle = GetVehiclePedIsIn(PlayerPedId())
exports["jim-mechanic"]:DamageRandomComponent(vehicle)

HasHarness

Retrieves if the user currently has a harness buckled while in a car

Example Usage:

local harnessOn = exports["jim-mechanic"]:HasHarness()

seatBeltOn

Retrieves if the user currently has a seatbelt buckled while in a car

Example Usage:

local seatbeltOn = exports["jim-mechanic"]:seatBeltOn()

GetNosLevel

Retrieves the current Nos status of a vehicle

Example Usage:

local vehicle = GetVehiclePedIsIn(PlayerPedId())
local nosLevel, hasNos = exports["jim-mechanic"]:GetNosLevel(vehicle)

print("Vehicle Nos Status:", tostring(hasNos))
print("Current Nos Level:", tostring(nosLevel))

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

local inPreview = exports["jim-mechanic"]:GetInPreview()
print("Player preview mode:", tostring(inPreview))

updateVehicle

Simply, complies the vehicle status table to save it to the database on command

Example Usage

local vehicle = GetVehiclePedIsIn(PlayerPedId())
exports["jim-mechanic"]:updateVehicle(vehicle)

GetMilage

Example Usage

local milage = exports["jim-mechanic"]:GetMilage(plate)
print("Current Milage:" tostring(milage))

This retreives the raw value of the milage from the database


IsVehicleOwned

Example Usage:

local owned = exports["jim-mechanic"]:IsVehicleOwned(plate)
if owned then
    print("This vehicle is owned")
else
    print("This vehicle is NOT owned")
end

Checks the database for if the plate is attached to an owned vehicle


Server Exports

GetMilage

Example Usage

local milage = exports["jim-mechanic"]:GetMilage(plate)
print("Current Milage:" tostring(milage))

This retreives the raw value of the milage from the database


IsVehicleOwned

Example Usage:

local owned = exports["jim-mechanic"]:IsVehicleOwned(plate)
if owned then
    print("This vehicle is owned")
else
    print("This vehicle is NOT owned")
end

Checks the database for if the plate is attached to an owned vehicle


PreviousCreating a LocationNextNitrous

Last updated 20 hours ago