Raised This Month: $ Target: $400
 0% 

My CVAR Problems/and other questions.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-24-2010 , 02:50   Re: My CVAR Problems/and other questions.
Reply With Quote #9

Quote:
Originally Posted by Moe View Post
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_print0print_chat"The %s server IP is %s"servernameserverip)
}
public 
DisplayServerMap
{
 
client_print0print_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
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode