Raised This Month: $ Target: $400
 0% 

[ANY] Simple Player Counter 0.5.3 (2016-09-13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
almostagreatcoder
Member
Join Date: Oct 2015
Plugin ID:
5351
Plugin Version:
0.5.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    22 
    Plugin Description:
    Keeps track of players currently playing on a game server by generating text files. Useful for checking server's activity via linux console/shell script.
    Old 09-13-2016 , 16:13   [ANY] Simple Player Counter 0.5.3 (2016-09-13)
    Reply With Quote #1

    Simple Player Counter

    This is a simple plugin serving a very specific purpose: it keeps track of the players that are currently playing on a server by maintaining zero to three files, located in the game's root folder:
    • numberofplayers.txt -> you will find the number of currently connected clients here
    • listofplayers.txt -> holds a list of all players currently connected
    • idlenow.txt -> indicates when no one is connected

    Why would you need that? Well - you don't necessarily, I think. For me, I was looking for a simple way to check my server's activity by just logging in via SSH and looking into some files (so you don't have to start the game itself). I also use the idlenow.txt file to automatically update the server when no one is connected.

    Maybe there are other, even more simple ways to check how many clients are connected (and that can also be used in an automatic update script running periodically)? I don't really know, to be honest. But for me this was kind of fun to write my first SourceMod plugin, so here we are!

    CVars
    • sm_spc_version -> the plugin's version, obviously...
    • sm_spc_countplayersfile -> File name for keeping track of the number of connected players. If set to "", the file will not be generated
    • sm_spc_listplayersfile -> File name for generating the list of players. Again: "" means no file.
    • sm_spc_idlefile -> File name for indicating when the server has no players. "" = no such file.

    Installation

    Plain & easy: put the simpleplayercounter.smx into your SourceMod config folder and Bob's your uncle. If you want to rename or disable one or more of the files described above, just edit the file .../cfg/sourcemod/plugin.simpleplayercounter.cfg (after having loaded the plugin at least once).

    Download

    You will always find the most recent version on GitHub!
    https://github.com/almostagreatcoder...player_counter
    Attached Files
    File Type: smx simpleplayercounter.smx (5.6 KB, 316 views)
    File Type: sp Get Plugin or Get Source (simpleplayercounter.sp - 815 views - 4.6 KB)

    Last edited by almostagreatcoder; 09-15-2016 at 09:46. Reason: ...
    almostagreatcoder is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:06.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode