Raised This Month: $ Target: $400
 0% 

var hostname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
d4rkm3n
Junior Member
Join Date: Aug 2004
Old 12-22-2005 , 07:52   var hostname
Reply With Quote #1

hi,
how is it possible to read the hostname from the "server.cfg" and save it into a variable?
d4rkm3n is offline
Zor
Veteran Member
Join Date: Mar 2004
Location: Toronto, ON
Old 12-22-2005 , 08:12  
Reply With Quote #2

Using a plugin you would do the following:

Code:
new g_hostname[128]
get_localinfo("hostname", g_hostname, 127)
That would give you the hostname in the variable g_hostname.

Cheers!
__________________
Zor is offline
Send a message via AIM to Zor Send a message via MSN to Zor Send a message via Yahoo to Zor
d4rkm3n
Junior Member
Join Date: Aug 2004
Old 12-22-2005 , 08:51  
Reply With Quote #3

thank you for you post, but i want to know how to read it from the server.cfg
d4rkm3n is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-22-2005 , 13:46  
Reply With Quote #4

If you want to read it from server.cfg instead of the actual cvar for some reason, you'll have to use the file reading functions from file.inc
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply



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 15:55.


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