Version of our main plugin and mapchanger for public server (without source code).
Firstly put the list of server maps named as
maps.txt
in
cstrike
folder.
Data storage:
1) players settings are saved as text files int
\cstrike\addons\amxmodx\data\settings
folder. If you want to save them into your database, you can disable text files by setting
kz_txt_settings 0
(just write it down into
\cstrike\addons\amxmodx\configs\amxx.cfg
).
2) top15 (up to 200 records) are saved as files with the same name pattern and format as used by ProKreedz (
pro_mapname.cfg
and
Noob_mapname.cfg
in
\cstrike\addons\amxmodx\data\kz\top15
folder). Saving into these files can disabled with
kz_txt_top 0
. All weapon records are saved in the same files as usp/knife runs.
3) saveposes are saved as text files in
\cstrike\addons\amxmodx\data\savepos
. You can disable saving into these files by setting
kz_txt_savepos 0
.
To work with your database you can use API with following forwards (id - player identifier):
fwSettings(id, szBuffer[]) - forward is registered in the main plugin, passes a string with settings. Call this function in your plugin and save the string into your database by player's SteamID.
fwLoadSettings(id, szBuffer[]) - this function is called by main plugin, while you need to register forward that will pass a string with settings on player's connect.
fwTopRecord(id, iTime, szWeapon[], iCp, iGc) - forward is registered in the main plugin, it passes record time in milliseconds, string with weapon name, number of cp and gc. Save these data into your database by player's SteamID for the current map. Print in chat message about the record, with a place in the top if necessary.
fwSavepos(id, szBuffer[]) - forward is registered in the main plugin, it passes a string with info about savepos. Call this function in your plugin and save the string in your database by player's SteamID for the current map.
fwLoadPos(id, szBuffer[]) - this function is called by the main plugin, you need to register it as forward, which passes the string with savepos info on player's connect.
Download plugin
How to use forwards
Also here's an example of source for your own servers list (write it down in
plugins.ini
before main plugin
kz_rush_loc.amxx
):
Download