Extraer... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Extraer... (
/showthread.php?tid=581796)
Extraer... -
romperson - 15.07.2015
Hay alguna manera de extraer la IP desde donde se esta iniciando el servidor ?
Re: Extraer... -
SickAttack - 15.07.2015
pawn Код:
stock GetServerIP()
{
static ip[16];
GetConsoleVarAsString("bind", ip, sizeof(ip));
return ip;
}
Agrega 'bind ***.***.***.***' a server.cfg y luego utiliza ese funcion.
Respuesta: Extraer... -
bm0z - 15.07.2015
Cuando se inicia el servidor, en el log sale "Started server on ...", si tienes agregado "bind", sale la ip, sino solamente sale el puerto y el servidor se inicia en todas las direcciones de ip disponibles.
Re: Extraer... -
Daniel-92 - 15.07.2015
PHP код:
#include <a_samp>
#include <a_http>
public OnFilterScriptInit() {
HTTP(0,HTTP_POST,"l2.io/ip"," ","ServerIP");
}
forward ServerIP(extraid,response_code,data[]);
public ServerIP(extraid,response_code,data[]) {
printf("El servidor ha iniciado en la IP %s:%d",data,GetServerVarAsInt("port"));
}