How to save ranks in Counter-Strike
When you setup Counter-Strike server, by default the player ranks are saved on server and they are present even when the server is restarted. Unless you have done something terribly wrong with your server settings which is what happened in our case.
A few days back we had to reinstall our server from scratch. While installation, we missed something because of which the player ranks in server were not saving any more. When ever the server restarts, all the ranks where gone. As a result, the /top15 /me /rank /rankstats and other rank related commands were showing incorrect results.
The player scores during the game where showing properly but once the server is restarted or crashed, all the server ranks which are meant to be persistent are reset to zero. The plugin responsible for the ranks is statsx.amxx which was loaded and running without any issues. After hours of bug hunting we finally found the culprits and the ranks started to save properly.
How to fix:
Following are the possible issues that might prevent your server ranks to survive restarts and crashes:
- Directory Permissions:
This is the most common reason if you are using a Linux based server.
However, this can also happen on a Windows server if you have messed up with folder permissions.
Before anything else, make sure the cstrike/addons/amxmodx/data directory actually exists and if it doesn’t, create it.
The ranks are saved in a file named csstats.dat in cstrike/addons/amxmodx/data directory.
If using Linux server, make sure the user running HLDS has write permissions on data directory.
To do this, logon to ssh, change directory to cstrike/addons/amxmodx and write this command:chown -R hluser:hluser data
Replace hluser with the username that is running HLDS.
If using Windows server, open properties of data directory, goto Security tab, click on Edit and make sure Write is ticked.
- Plugin Missing:
Make sure the plugin statsx.amxx is present in cstrike/addons/amxmodx/plugins folder and its entry is present in cstrike/addons/amxmodx/configs/plugins.ini file without the semi-colon ; in its start.
- Module Missing:
Make sure the csx module file is present in cstrike/addons/amxmodx/modules directory and its entry is present in cstrike/addons/amxmodx/configs/modules.ini file without the semi-colon ; in its start.
In Linux server the module’s file name is csx_amxx_i386.so while in Windows server, the name is csx_amxx.dll - stats.ini File:
Make sure the cstrike/addons/amxmodx/configs/stats.ini file has the following entries at least:
ShowAttackers ;Show Attackers
ShowVictims ;Show Victims
ShowStats ;HUD-stats default
SayRankStats ;Say /rankstats
SayRank ;Say /rank
SayTop15 ;Say /top15
SayMe
Once you have made the required changes, let the server restart a few times and see if the ranks are being saved.
In case all of the above mentioned fixes fail, just write in comments and we will find a solution!
I have the same problem on my server,I use Linux and I don´t know how to put that command.Any help ?
Its pretty easy.
Just run this command in your terminal: (you will need SSH access)
chmod -R 0777 /path/of/your/server/cstrike/addons/amxmodx/data
Replace /path/of/your/server/ with your actual path and you are good to go.
After that, restart your server and see if its working.
Let me know if it works or not.
Thanks for the tutorial Taimor,
Every things is as you have stated but the ranks are reset as soon as we reboot server from KGB game panel!
Any idea!
I haven’t managed any KGB Server personally so you will have to ask the server provider to set the proper permissions on file for you.
taimoor plzz help me how i can make myself admin after creating server??
You can see Saleem’s comment on how to do that!
mera cs download nahi horaha kiya karun help
You can download and install it from here: http://www.counterstrike.com.pk/2014/02/how-to-install-counter-strike-1-6/
taimoor bhai plz help me
What errors are you getting while downloading?
bhai rank problem aa raha ha sab kuch karlia as above but it says server has disabled this option
bhai rank problem aa raha ha sab kuch karlia as above but it says server has disabled this option waiting for your reply taimoor bhai
bhai banned hn
nick in cs
USAMA SARWAR PAKISTAN ARMY ISPR