Get IP of server?
#1

Hi guys

Is possible to make ongamemodeinit check on which IP is run server...I use my mode on 3 different IP (My main server,my public test server(for staff,test update,5 slots...) and localhost,haha) . So I want to make check in ongamemodeinit for example

Код:
if(IPAdress == 130.321.3224.:4040)
{
g_SQL = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
}
else if(IPAdress == 242.133.3131:4040)
{
g_SQL = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
}
else //localhost
{
g_SQL = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
}
Is something like this possible?Now I need to change my MYSQL data every time...I hope you can understand me,thanks.
Reply
#2

I dont understand.I just want when i run server on X IP,that i use different MySQL data ,then on Y IP..If you can understand me..
Reply
#3

Yes I'm try and i'm not find answer for my question,okey? It's reason why I'm asking here,what is problem?

Thanks
Reply
#4

https://sampwiki.blast.hk/wiki/GetConsoleVarAsString + https://sampwiki.blast.hk/wiki/Server.cfg -> bind
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)