madis Posted December 14, 2009 Posted December 14, 2009 What's the easiest way to do it? Can be server side as well.
robhol Posted December 14, 2009 Posted December 14, 2009 Well... if there's no built-in function to do it, (I don't think there is) maybe you can callRemote() an external PHP script which just returns your IP. Would be easy to make. But why do you need this?
madis Posted December 14, 2009 Author Posted December 14, 2009 Thanks, robhol. It isn't mandatory or anything. I just want a server IP to show on scoreboard (actually making a Battlefield Vietnam clone scoreboard for bfv mod, if I'll do it someday).
eAi Posted December 14, 2009 Posted December 14, 2009 As robhol says, callRemote to a website is your best bet - there's no real way for a computer behind NAT to know it's external IP.
madis Posted December 14, 2009 Author Posted December 14, 2009 But could client know the IP last connected to? As there is a list in MTA/coreconfig.xml . I know/think a resource can't access it, but maybe as a feature request of MTA?
subenji99 Posted December 14, 2009 Posted December 14, 2009 http://www.whatismyip.com/automation/n09230945.asp returns your IP only, no fancy parsing required. A simple matter for callRemote() to read.
eAi Posted December 14, 2009 Posted December 14, 2009 The client could know, yes... I'm surprised that isn't already available to scripts.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now