AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Getting localhost IP adress (https://forums.alliedmods.net/showthread.php?t=62464)

hleV 10-27-2007 17:58

Getting localhost IP adress
 
I need function, that get's localhost IP, I mean not 127.0.0.1 or 162.168.0.1 but real IP, like 78.72.25.11. I need it to create some functions, if server's ip isn't that, what it should be. Anybody?

YamiKaitou 10-27-2007 18:49

Re: Getting localhost IP adress
 
Use get_user_ip(0,....) to get the server's ip. If it returns 192.168 or 127.0, then that is because you are behind a router and you can't prevent that

RaYden 10-28-2007 06:35

Re: Getting localhost IP adress
 
You could use port forwarding ... some modern routers do that automatically (like mine for instance :p )

Greenberet 10-28-2007 06:39

Re: Getting localhost IP adress
 
Quote:

Originally Posted by RaYden (Post 546998)
You could use port forwarding ... some modern routers do that automatically (like mine for instance :p )

only if upnp is enabled on your router and your pc

ontopic:
try to connect to an webserver which tells you your outbound ip and check it then


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

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