This script show up player ingame playtime. You can setup in this script translate and also you can define how that command will be called.
In default are these commands
β/playtimeβ (for players) - It show up player playtime of himself
β/playtimeid IDβ (for admins) - It show up player playtime
β/cplaytimeβ (for players) - It show up player playtime on his character
β/cplaytimeid IDβ (for admins) - It show up player playtime on his character
Configuration
You will find everything you need in config.lua
config.lua
Config = {}Config.Debug =false--Command for me to debug script. It print to console passes trough conditions. true/falseConfig.PlayerCommand = "cplaytime" --Command which will display playtime in chat (This playtime is on character not on account) ------ (podehrano)
Config.PlayerAdminCommand = "cplaytimeid" --Command which will display Players playtime in chat (This playtime is on character not on account) ----- (podehranoid)
Config.AccountPlayerCommand = "playtime" --Command which will display playtime in chat (This playtime is on account not on character) ------ (odehrano)
Config.AccountAdminCommand = "playtimeid" --Command which will display Players playtime in chat (This playtime is on account not on character) ----- (odehranoid)
Config.ThreadIncrease = 5 --Default QBCore loop time is 5 minutes. Change it only if you changed time in QBCore loop in otherwise it will broke up script
--Language is in fxmanifest.lua
Language /locale/en.lua
en.lua
local Translations = { notifications = { playtime ="You've played ", wrongid ="Wrong ID or Player isn't online", playtimeplayer =" has played ", acc =" (Account)", char =" (Character)", }, time = { days ="days", hours ="hours", minutes ="minutes", }, utils = { descriptions ="Displays player's playtime", IDPlayer ="Player ID", },}Lang = Locale:new({ phrases = Translations, warnOnMissing =true})