08.04.2010, 20:03
It would in this case
And since strcmp has the nasty issue of saying that 2 strings are the same if one is empty, you could also do length checks
pawn Код:
if (GetPlayerIp(i, plrip, sizeof(plrip)))
{
if(!strcmp(IP, plrip, false, 17))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(logstring, sizeof(logstring), "RCON: Player %s(ID %d, IP: %s) tried to login as RCON, but failed.", name, i, IP);
}
}
else format(logstring, sizeof(logstring), "RCON: IP %s tried to login as RCON, but failed.", IP);