Здравствуйте, я привязываю плагин вот так:
current_ip_port - стал 0.0.0.0:27015 и в status udp/ip : 0.0.0.0:27015 .. сервер на хосте править start.sh я не могу (параметры запуска) как выкрутиться из ситуации? как получить внешний IP сервера?
C-подобный:
new const String:IP_PORT[] = "192.168.0.1:27015";
new Handle:h_IP = FindConVar("hostip");
new Handle:h_PORT = FindConVar("hostport");
if (h_IP == INVALID_HANDLE || h_PORT == INVALID_HANDLE)
{
SetFailState("h_IP || h_PORT == INVALID_HANDLE");
return;
}
new hostip = GetConVarInt(h_IP);
new ip1 = hostip >>> 24 & 255;
new ip2 = hostip >>> 16 & 255;
new ip3 = hostip >>> 8 & 255;
new ip4 = hostip & 255;
decl String:current_ip_port[75];
Format(current_ip_port, 75, "%d.%d.%d.%d:%d", ip1, ip2, ip3, ip4, GetConVarInt(h_PORT));
if (strcmp(current_ip_port, IP_PORT, false) == 0) {}
else SetFailState("\nYour server: %s. Plugin for: %s", current_ip_port, IP_PORT);