07.10.23 10:42 - Pinned post
Version of our LJ statistics for public server (without source code for now).
Stats settings are saved into
\cstrike\addons\amxmodx\configs\kz_jump_stats.cfg
(it's created on first plugin usage).
Player settings are saved as text files in
\cstrike\addons\amxmodx\data\ljsettings
folder. If you want to save them into your database, you can disable saving in text files by setting
kz_txt_ljsettings 0
(just add it at the end of
\cstrike\addons\amxmodx\configs\amxx.cfg
). Then just use the following API forwards (id - player identifier):
fwLjSettings(id, szBuffer[]) - this forward is registered into the stats plugin, it passes the string with player's settings, so you can call this function in your plugin and just save this string into the database by player's SteamID. If you need maximum string length, it's 550. You can parse the string, but then you'll have to create it back before loading it into the stats.
fwLoadLjSettings(id, szBuffer[]) - this function parses player's settings in stats plugin, so you need to register it and pass here the string with settings from your database.
Other forwards that need to be registered and then called from the main plugin:
fwResetBug(id) - called when using noclip, hook and any kind of teleports.
fwSetAirAccel(id, iAirAcc) - if on the server you can set airaccelerate individually for each player, then this forward should be called at each aa change (as well as entering the server), passing the currently used integer value as iAirAcc (10, 100 or other). If this forward is not used, the value will be taken from the server cvar sv_airaccelerate.
Download plugin
How to use forwards