AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Serverinfo (https://forums.alliedmods.net/showthread.php?t=24572)

p3tsin 02-26-2006 11:54

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 :)

GHW_Chronic 02-26-2006 12:29

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:

Originally Posted by GHW_Chronic
with all do respect


v3x 02-26-2006 12:56

Looks sexy :D

JKB 02-26-2006 13:11

Cool, this is for when you run multiple servers, right?
Correct me if im wrong :S

p3tsin 02-26-2006 13:20

@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

p3tsin 02-26-2006 15:32

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

TiMbErLaNd 03-01-2006 14:40

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!

SoBe Green 03-28-2006 16:01

Quote:

Originally Posted by GHW_Chronic
A. If you don't know if this is HL1 or HL2 or if you are playing CS or TS, pretty sad :/

I'd find it nice to know that my favorite CS 1.6 server community might be running some source related servers. So I wouldn't label this one completely useless. But I do agree the mod directory is a bit useless.

p3tsin 03-31-2006 11:02

** 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 :? )

Otzku 04-22-2006 08:23

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.