Studio PLAYERS
  • Studio PLAYERS
  • 📦QB/QBX SCRIPTS
    • 💸SA-MONEY
      • 💡Introduction
      • ⚙️Installation
        • ⚙️Installation
        • ⚙️Migration
        • ⚙️Add new currency
      • 🗃️Displays $ in inventory
      • 📚HUD Implementations
        • 📗17mov_Hud
        • 📗wais-hudv5
    • 💰SA-MONEYWASH
      • 💡Introduction
      • ⚙️Installation
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🧊SA-BOXE
      • 💡Introduction
      • 💡Usage
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 📦ESX SCRIPTS
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 🛠️FAQ
    • 🛠️General Issues
    • 🛠️SA-Money-V2
Powered by GitBook
On this page
  1. QB/QBX SCRIPTS
  2. SA-PLAYTIME

Exports

Do you need a playtime in the different script?

  • Here are the exports for our PlayTime system.

  • Now you can easily get playtime in a different script.

These exports are server side

server_example.lua
RegisterCommand('test', function(source)
    local playtime = exports['SA-Playtime']:GetPlayTime(source)

    print(playtime)
end)

RegisterCommand('test2', function(source)
    local playtime = exports['SA-Playtime']:GetPlayTimeNumber(source)

    print(playtime)
end)
console -> /test
// [  script:SA-Playtime] 0 days, 0 hours, 45 minutes.
console -> /test2
// [  script:SA-Playtime] 45

Last updated 6 months ago

📦
🕐
✈️