AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   var hostname (https://forums.alliedmods.net/showthread.php?t=22247)

d4rkm3n 12-22-2005 07:52

var hostname
 
hi,
how is it possible to read the hostname from the "server.cfg" and save it into a variable?

Zor 12-22-2005 08:12

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!

d4rkm3n 12-22-2005 08:51

thank you for you post, but i want to know how to read it from the server.cfg

XxAvalanchexX 12-22-2005 13:46

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


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

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