tdPlaytime has two components: a tool that copies txAdmin player playtime into MySQL and an optional td-playtime resource that reads it with /playtime. The importer is not a continuously updating FiveM resource. The creator supplies a Windows executable and JavaScript source.
Creator source and setup instructions
Prepare a repeatable import
Use a database copy first. Configure dataFilePath and database settings in config.json, and keep credentials and player-identifier logs private. The source requires Node.js and its declared mysql dependency; the packaged executable targets Windows 10/11. Confirm that the selected JSON has a players array with license and playTime fields.
Each import writes player_playtimes by license and replaces the stored playtime value. It does not add a new session duration. Verify that the source snapshot is current before overwriting existing values, and compare several players with the source file after a run.
Handle empty files and failures before scheduling
The inspected source closes its MySQL connection only after every player update succeeds. An empty players array, file-read or JSON error, or failed database write does not take that normal close path. Check exit behavior and add appropriate error handling and a job timeout before unattended scheduling. A process that remains running is not proof that it is still synchronizing.
Configure and test the optional reader
The td-playtime manifest loads @mysql-async/lib/MySQL.lua. Start a compatible mysql-async installation first. The reader looks up the player’s license and interprets the stored value as minutes; notification integrations fall back to chat. Test /playtime after an import and reconnect. Back up the table before changing the importer or its source snapshot.