✈️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.

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