pScripts
  • INFORMATION
    • FiveM Asset Escrow System
    • Assets Updates
    • Discord Roles
  • Assets & Guides
    • 🏛️Banking
      • 👋Installation Guide
      • ⚙️Editable Files
      • Client Exports
      • Server Exports
    • 👨‍⚖️DOJ Job
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻DOJ MDT
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🌿Weed Plants
      • 👋Installation Guide
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 🚗Car Sale Job
      • 👋Installation Guide
      • ⚙️Config File
      • Client Exports
      • Server Exports
    • 📙Job Core
      • ⚙️Config File
      • Exports
    • 👮Police Job
      • 👋Installation Guide
      • ⚠️Common Issues
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
        • Bodycam
        • Evidence System
        • Duty GPS
        • Interactions
        • Jail System
        • Police Objects
        • Speed Camera
        • Manage Traffic
        • Misc
      • Server Exports
        • Evidence System
        • Interactions
        • Jail System
        • Misc
    • 💻Police MDT
      • ⁉️Setup Server
      • ⚙️Config File
      • Client Exports
      • Server Exports
      • Dispatch System
    • 🚑Ambulance Job
      • 👋Installation Guide
      • ⁉️Setup Server
      • ⚙️Config Files
      • Client Exports
      • Server Exports
    • 💻Ambulance MDT
      • 👋Installation Guide
      • ⚙️Config File
      • Exports and Events
      • Dispatch System
    • 🛠️Mechanic Job
      • ⚙️Config Files
      • Mileage System
      • Nitro System
      • Lifters System
      • Misc
    • 💻Mechanic MDT
      • ⚙️Config File
      • Exports
      • Dispatch System
      • Licenses System
    • 💵Fleeca Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • ⌚Jewelry Robbery
      • 👋Installation Guide
      • ⚙️Config File
    • 💇Appearance
      • ⚙️Config Files
      • Client Exports
    • 👀Hints
      • Exports
    • 👋Helper
      • Exports
    • 🔧Tuning Menu
      • Exports and Events
      • ⚙️Config Files
    • 🆔Documents
      • ⚙️Config File
      • Exports and Events
    • 📱Phone
      • ⤵️INSTALLATION
      • ⚙️CONFIG FILES
      • 📃FEATURES
      • 📱APPS
      • 📇SIM CARDS
      • 📳NOTIFICATIONS
      • 📨MESSAGES
      • 🚘GARAGES
      • 🪙CRYPTO
      • 🔪DARK CONNECT
      • ⌨️FUNCTIONS
      • 🌎LANGUAGE
      • ⚠️COMMON ISSUES
    • 🪙Casino Games
      • 🎰Slot Machine
      • 🏐Roulette
      • ♣️Poker
    • 💻GCT
      • 📨EXPORTS
    • 💻Civil MDT
      • ⤵️INSTALLATION
      • 📱APPS
      • 🏎️BOOSTING
      • 🏅ACHIEVEMENTS
      • ⚠️COMMON ISSUES
Powered by GitBook
On this page
  • getMileage
  • Example of Usage
  • formatMileage
  • Example of Usage
  1. Assets & Guides
  2. Mechanic Job

Mileage System

getMileage

With following export you can get mileage of an vehicle [vehicle must be networked].

  • entity number

exports['p_mechanicjob']:getMileage(entity)
  • entity number

exports['p_mechanicjob']:getMileage(entity)

Example of Usage

local entity = GetVehiclePedIsIn(PlayerPedId(), false)
local mileage = exports['p_mechanicjob']:getMileage(entity)
print(mileage)
-- THIS CODE WILL RETURN MILEAGE OF PLAYER VEHICLE
local playerId = 1 -- replace with existing player id
local playerPed = GetPlayerPed(playerId)
local entity = GetVehiclePedIsIn(playerPed, false)
local mileage = exports['p_mechanicjob']:getMileage(entity)
print(mileage)
-- THIS CODE WILL PRINT MILEAGE OF PLAYER VEHICLE

formatMileage

With this export you can format vehicle mileage.

  • mileage number

exports['p_mechanicjob']:formatMileage(mileage)
  • mileage number

exports['p_mechanicjob']:formatMileage(mileage)

Example of Usage

local entity = GetVehiclePedIsIn(PlayerPedId(), false)
local mileage = exports['p_mechanicjob']:getMileage(entity)
local formattedMileage = exports['p_mechanicjob']:formatMileage(mileage)
print(formattedMileage)
-- THIS CODE WILL PRINT FORMATTED MILEAGE OF PLAYER VEHICLE
local playerId = 1 -- replace with existing player id
local playerPed = GetPlayerPed(playerId)
local entity = GetVehiclePedIsIn(playerPed, false)
local mileage = exports['p_mechanicjob']:getMileage(entity)
local formattedMileage = exports['p_mechanicjob']:formatMileage(mileage)
print(formattedMileage)
-- THIS CODE WILL PRINT FORMATTED MILEAGE OF PLAYER VEHICLE
PreviousConfig FilesNextNitro System

Last updated 5 months ago

🛠️