IP of the host the server is running on?
#1

Is there a special function to get the IP of where the server is running on? Well, I know one way.. connecting an NPC and getting its IP. Is there another way?
Reply
#2

If there is "bind" specified in the .cfg you could use https://sampwiki.blast.hk/wiki/GetServerVarAsString
Reply
#3

You can do it this way, but you have to put the IP in server.cfg under 'bind'.
pawn Код:
new serverip[16];
GetServerVarAsString("bind", serverip, sizeof (serverip));
Reply
#4

If he is going to bind his server to an IP, he might as well just write the IP into a string manually : )
Reply
#5

Quote:
Originally Posted by Knappen
Посмотреть сообщение
If he is going to bind his server to an IP, he might as well just write the IP into a string manually : )
Well said.
Reply
#6

Why do you want to get the IP of your server?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)