...I was practicing sql things.
So here is my version. Not so perfect tough.
Install:
- drag and drop files in your server.
- if everything went right, you have example file in
...addons/sourcemod/configs/databases.example.cfg
Open file with text editor and look
lastplayers { } configure and add it in your own file -> databases.cfg
- reboot server
- Join server or use server console, type command
sm_lastplayers
You should see something like this.
Code:
sm_lastplayers
| rowid | name | steamid | disconnected |
| 1 | 'Bacardi | [U:1:28327177] | 2021-10-04 23:04:01 |
| 2 | Plugin made by Bacardi | 69 | 2021-10-01 00:00:00 |
Plugin features:
- Every time when plugin is loaded,
it delete all, over 2 months old records and do "vacuum" to short database size.
To clarify more, it keep records past two - three whole months. Date start first day of month.
- This plugin works with
SQLite, not MySQL.
- Works with in one server only. Database locate in
...addons\sourcemod\data\sqlite
Command is public, not restricted for admins only.
You can restrict command sm_lastplayers for admins from admin_overrides.cfg. Not need edit and compile plugin.