AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get the server ip? (https://forums.alliedmods.net/showthread.php?t=9536)

More 01-22-2005 12:44

How to get the server ip?
 
I know this is a very stupid question but how i could get the ip of the server amxmodx is running on?
I want to make a status script which returns hostname etc and so I need the server ip

I only know the way to connect via sockets to whatismyip.org and get the info there, but isn't there an easier way?

XxAvalanchexX 01-22-2005 13:50

http://www.amxmodx.org/forums/templa...ini_search.gif Search

Use get_user_ip with 0 as the player index.

filou 02-14-2005 02:21

Or Simply use get_cvar_string( "ip" , srv_ip , 31 ) if ip specified in start command line. :wink:


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

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