26.12.2009, 13:26
[FS]Playercount (With saving)
What is this?This is a pretty simple and basic filterscript, which stores how many players who have connected to your server, to a file.
By using the command "/pcount [params: all/current/total]" you will get a message which says how many players have connected since last time the fs loaded
and how many players who have connected to the server all-time.
This script is pretty basic, but might be useful.
Changelog:
Quote:
/*[CHANGELOG] 10:39PM 8 December, 2009 - Beta 1 (v0.5) done. - No testing done yet. 3:08PM 16 December, 2009 - Beta 2 (v0.7) done. - Some testing done, but only by Miokie*(thanks), not myself. 8:28PM++ 21 December, 2009 - Beta 3 (v0.9) done. - No more testing done since last time. - Removed ReturnCount function, and put the content inside the command. - Remove g_iTotalCount variable, no need for it. - Made command available for all players by default (was admins only). - Added debug prints for all callbacks, to be sure everything works correctly (even for the zcmd commands) - Added a toggle command for admins (FS enabled/disabled) 6:25AM 22 December, 2009 - Beta 4 (v0.95) done. - Added a RCON console command for testing purposes. "opc" called OnPlayerConnect 15 times, and playercount increased correctly - Waiting for last testing with real players before releasing FS. 3:00PM 26 December, 2009 - First stable release (v1.0) done! - Tested with blank script, no errors/mistakes/bugs (as I could see) - Fixed a small bug (total was 0 if it was 0 in the file, even if current was 1. that is fixed now) - Released at the forums for the first time. */ |
/pcount [params: all/current/total]
- 'all' Sends a client message with total AND current playercount.
- 'current' Sends a client message with ONLY current playercount.
- 'total' Sends a client message with ONLY total playercount.
Requires:
dINI (by Dracoblue)
ZCMD (by ZeeX)
Download URLs:
v1.0
Source Code:
Pastebin - http://playercountfs.pastebin.com/f7415cb9e
Mediafire - http://www.mediafire.com/file/ynjjul...layercount.pwn
Compiled Source:
Mediafire - http://www.mediafire.com/file/i1zukm...layercount.amx
Zipped Archive (Compiled and Source Code):
Mediafire - http://www.mediafire.com/file/tzudfh...layercount.rar
Mirror's are welcome, and will be added here ^
Enjoy, and have fun!
- lrZ^