27.08.2017, 13:04
I'm using y_utils IPtoInt, i.e
pawn Код:
stock IPToInt(ip[])
{
new
ipv = strval(ip) << 24,
pos = 0;
while (pos < 15 && ip[pos++] != '.') {}
ipv += strval(ip[pos]) << 16;
while (pos < 15 && ip[pos++] != '.') {}
ipv += strval(ip[pos]) << 8;
while (pos < 15 && ip[pos++] != '.') {}
return ipv + strval(ip[pos]);
}