Thanks a load man, it works with server.cfg also!
This really helped me out, thanks a load man!
Does this work?
PHP Code:
public plugin_init
{
register_clcmd("say /ip", "DisplayServerIP");
register_clcmd("say /map", "DisplayServerMap");
}
public DisplayServerIP
{
client_print( 0, print_chat, "The %s server IP is %s", servername, serverip)
}
public DisplayServerMap
{
client_print( 0, print_chat, "The current map is %s", mapname)
}
Besides the fact that the variables they're using are non-existent.
Why can't you retrieve the cvar value in plugin initiation? It has worked for me before.