โœˆ๏ธ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
  • Now import playtime.sql into your database

Now it's done and it should work. If it doesn't work try other tips or contact us on Discord

Last updated