[Release] pTracker - Playtime & Last seen & Leaderboard

Hello everyone, I’m releasing a lite version of my “player stats” script.

Currently, this version provides three features: getting the total play time, a leaderboard and the last connection date of a player.
I managed to make this script standalone and compatible with all “gamemode” so it will work everywhere with all resources.

The only resource required is “hardcap”, actually the script needs an event that is triggered when a player is successfully connected.

Screens

image

image

Commands

  • /time [hex or player’s name or nothing for you] -> Get the total play time on the server.
  • /seen [hex or player’s name or nothing for you] -> Get the last connecting date.
  • /leaderboard -> Get the playtime leaderboard.

Source code Github | Download Releases

For developpers

I strongly suggest to convert the current “storage” system to MySQL if you wanna make cool things. I am too lazy to make a version for all MySQL resources.

Otherwise, you can grab the “tracked data” by using LoadResourceFile to get the content of data/trackedData.json.

You can also put sv_stats and the data folder in another resource it should work.

Next features
  • Discord bot
  • Dormant account check
Cool things you can do with a discord bot

image

image

10 Likes

hmm soo cool


Thanks dude

1+

Very nice job bro :slight_smile: Merci pour le partage !

Salut, merci pour le partage pichot

JSON database… Why not SQL

Because people use GHMattiMySQL or MySQL-async or essentialmode’s sql
Boring

1 Like

Long time i search for something like this, take it, install it, love it! thx!

There is an error:

return string.format( "%02iw

not

return string.format( "%02is

Fixed, thank you
weeks :smirk:

Does this deal well with server restarts while players are online?

It is “standalone” :blush:

1 Like

Work great !

New version released using typescript.
A version supporting SQLite might come ASAP.

1 Like

Started without error.

Nothing happen :(.

Je need trop!

image
Didnt change anything :confused:

Can you please send me your json data file in PM?
I’ll check and tell me what you did.

PM’d you buddy :slight_smile:

Try with the last release: https://github.com/PichotM/pTracker/releases

No work for me. But now I have commands registered. Any way to have help ?
@French /@English

SCRIPT ERROR in call ref: TypeError: Cannot read property ‘sort’ of null

RegisteredAllCommands.e [as callback] (@pTracker/dist/server.js:1)

Yes, i have the same error

1 Like

Same error too