OTHERPLANET DOCS
  • 🪐About US
  • 💻Scripts
    • 🔫OP Crime Organisations
      • Installation
      • Config Files
      • Customization
      • Tablet as Item
      • Global States
      • Exports
        • Server Side
    • 🚘OP Mechanic Job
      • Installation
      • Config File
      • Setup Jobs
      • Setup Dispatch
      • Get Duty
      • Update Tablet Stats
      • Notifications/Progressbar
      • Discord Logs
    • 🗒️OP Requests
      • Installation
      • Config
      • Usage
    • 🌇OP HUD
      • Config File
      • Instalation
      • Progress Bar Usage
      • Notify Usage
      • Alcohol Status & Stamina
    • 🏎️OP Vehicle Theft
      • Installation
      • OX Inventory
      • Translate Sounds
      • Config
      • Customization
    • 🅿️OP Garages V1 (OLD)
      • Installation
      • Config
        • Main
        • Garages Locations
        • Vehicles and Brands
      • Customization
      • Vehicle Types
      • Jobs
      • Exports
      • Other
Powered by GitBook
On this page
  1. Scripts
  2. OP Mechanic Job

Update Tablet Stats

How to set tablet stats from other scripts using our mechanic events?

Callback to return stats for selected job:

ESX.TriggerServerCallback('op-mechanicjob:getStats', function(stats)
    -- code EXAMPLE:
    stats = json.decode(stats)
    print(stats.tunings) -- Print amount of done tunings
end, jobName)

Event to update stats for selected job:

TriggerServerEvent('op-mechanicjob:updateStats', stats, jobName)

Stats must be JSON string;

PreviousGet DutyNextNotifications/Progressbar

Last updated 1 year ago

💻
🚘