Raised This Month: $ Target: $400
 0% 

How to get the server ip?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
More
Member
Join Date: Nov 2004
Location: Internet
Old 01-22-2005 , 12:44   How to get the server ip?
Reply With Quote #1

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?
More is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-22-2005 , 13:50  
Reply With Quote #2

Search

Use get_user_ip with 0 as the player index.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
filou
Junior Member
Join Date: Feb 2005
Location: France
Old 02-14-2005 , 02:21  
Reply With Quote #3

Or Simply use get_cvar_string( "ip" , srv_ip , 31 ) if ip specified in start command line.
filou 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 19:15.


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