Serverinfo
2 Attachment(s)
Serverinfo, by p3tsin
Description: Get status of defined servers (server name, current map, players/maxplayers, etc) Settings: Place serverlist.ini in amxmodx/data directory and add the addresses you want. (Note MAX_SERVERS definition!) Cvars & Commands: - srv_format - response format for queries - srv_format2 - response format when couldn't get server status - say /servers - prints the status of servers defined in serverlist.ini Response format variables: $type - HL1 / HL2 $ip - ip address $host - hostname $map - current map $dir - gamedirectory (e.g. cstrike) $mod - modname (e.g. Counter-Strike) $players - players/maxplayers $pw - password protected? (Yes/No) $timeleft - time remaining on current map $nextmap - next map Changelog: 1.00 - Initial release 1.01 - Fixed maxplayers showing as 0 when there are no players 1.10 - Added $timeleft and $nextmap - Improved speed Thanks to: Kraugh for helping me with the byte values in the response Oh, and you need Sockets module to run the plugin :) |
Most all of this can be setup easily with the use of this plugin:
http://forums.alliedmods.net/showthread.php?t=24092 And with all do respect, I don't think a client needs to know this: $type - HL1 / HL2 $dir - gamedirectory (e.g. cstrike) $mod - modname (e.g. Counter-Strike) A. If you don't know if this is HL1 or HL2 or if you are playing CS or TS, pretty sad :/ B. no use at all for the client to know the mod directory. Quote:
|
Looks sexy :D
|
Cool, this is for when you run multiple servers, right?
Correct me if im wrong :S |
@Chronic: the gamedirectory is only there coz the full modname may take up too much space (theres a limit of how many characters u may have in one message, u know) so "dod" might be better than "Day Of Defeat"
well yeah, i dont think many would use type/mod/dir in their response but some could.. and theres no harm if they exist :) @JKB: yes, thats right |
found a bug :o
if theres 0 players on the server, it will also show maxplayers as 0.. gotta take a look at it tomorrow EDIT: fixed |
http://forums.alliedmods.net/showthread.php?t=7347
Addin the option to directly connect to the server that you are currently viewing, like this one that I currently use. Yeah and like previously stated I think this could do without some of that info. We just need the meat and the potatoes. Keep up the great work! |
Quote:
|
** updated to v1.10 **
added $timeleft and $nextmap variables improved the speed of sending & receiving data (note: sry for hardcoring the couple values in the beginning of rulesparse, gotta figure out how to do it otherwise if ppl start having problems with it :? ) |
Thank you for this nice plugin! It will be really helpful and good for me.
|
All times are GMT -4. The time now is 11:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.