18.06.2018, 20:42
ConnIP is empty, holds the previous IP or changes value in another place. You need to get the IP directly.
pawn Код:
public OnPlayerConnect(playerid)
{
new player_ip[16];
GetPlayerIp(playerid, player_ip, 16);
if (IsPlayerNPC(playerid) && strcmp(player_ip, "127.0.0.1"))
{
Ban(playerid); // Ban is the safest thing here, as if you kick, they can still flood you with endless connections
return 0;
}
// ...
return 1;
}