View Single Post
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 08-22-2005 , 16:23  
Reply With Quote #9

By doing the simple changes below you can make your own theme as for how you want the info to be displayed.

When the changes are applied you can use the following vars in the server_theme cvar
Code:
<name> = Servername
<pl> = Current Players
<maxpl> = Max Players
<T> = Terrorist Score
<CT> = Counter Terrorist Score
<map> = Mapname
Example: (pasted in your server.cfg):
Code:
server_name "| ]:[PurePwnage]"
server_theme "<name> : Players [<pl>/<maxpl>] Score [T:<T>/CT:<CT>]:[ |"
-------------------------------------------------------

Replace in public init
Code:
register_cvar("server_theme", "1")
with
Code:
    register_cvar("server_theme", "<name> : [ <pl> / <maxpl> ] : [ <T> T / <CT> CT ]")

Replace UpdateHost() with the following one
Code:
public UpdateHost() {     new ServerName[20], ServerNameDone[150]     get_cvar_string("server_name", ServerName, 20)     get_cvar_string("server_theme", ServerNameDone, 149)     new Pl[10],MaxPl[10],T[10],CT[10],MapName[32]     num_to_str(totalplayers,Pl,9)     num_to_str(get_maxplayers(),MaxPl,9)     num_to_str(g_teamScore[1],T,9)     num_to_str(g_teamScore[0],CT,9)     get_mapname(MapName,33)     replace(ServerNameDone,149,"<name>",ServerName)     replace(ServerNameDone,149,"<pl>",Pl)     replace(ServerNameDone,149,"<maxpl>",MaxPl)     replace(ServerNameDone,149,"<T>",T)     replace(ServerNameDone,149,"<CT>",CT)     replace(ServerNameDone,149,"<map>",MapName)     server_cmd("hostname ^"%s^"", ServerNameDone) }
__________________
My Plugins

Got ??
AssKicR is offline