Quote:
Originally Posted by Moe
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.
|
I think that will work, but what I do is in the register_clcmd, i pass the flags as ADMIN_ALL. So register_clcmd("say /ip", "DisplayServerIP', ADMIN_ALL)
hmm and do u need to put () after declaring a function? idk