The title basically explains what this script does, this script was created at the request of someone here in the forum and as the idea is good and can be useful for many who intend to count and save the total time played by each player on the server, I decided to release it.
This script counts the total online time played on the server, not the online time in the current session.
Donwload V2
Donwload
WARNING
!!!I!!!I!!! I DONT RECOMEND YOU USING THIS SQL VERSION USE THE Online Time SQL V2 !!!I!!!I!!!
SQL Version: onlinetime_sql.rar (2.3 KB)
File .txt Version:onlinetime_file.rar (2.7 KB)
Read the info below, you will like it
Where the time is saved?
I made two versions of this script one version is a My SQL save, another version is a .txt file where is saved the time.
How it works?
/ot or /onlinetime
Will display the total online time played on the server by the player/source who executed the command.
/ot [ID] or /onlinetime [ID]
Will display to the player/source who executed the command the total online time played on the server by the ID written in the executed command.
MySQL Installation:
-
Drag the resource “onlinetime_sql” to your server resource folder.
-
Add this line to your server.cfg file: “start onlinetime_sql”
-
Copy and paste in your database the SQL code in sql.sql file.
-
Start your server!
To use the MySQL you will need the mysql-async in your server: mysql-async
File .txt Installation:
-
Drag the resource “onlinetime_file” to your server resource folder.
-
Add this line to your server.cfg file: “start onlinetime_file”
-
Start your server!
WARNING: Dont change the folder “tempo” inside this resource, or you will get some errors!
THIS IS NO LONGER REQUIRED AFTER THE UPDATE
WARNING: In this version dont change the resource folder name, or you are going to get a error.
If you do it be sure to change the diretory in the lines 14, 16, 47, 51, 109, 112 in the server.lua.
Also, dont restart this version in live server.
Detailed Suport:
ScreenShots
Thanks to:
@Clatanii for the idea
Take some ideas about the files saves from EasyAdmin made by @Blumlaut
Solved a big problem with files saves with the @Vespura help in this topic
@Flatracer for helping me to discover certain natives that helped to solve the fact of having to configure the script to be able to be used, that is, it helped in the automation of this script!
Thanks to @ryu2kk for helping in the test