23.02.2009, 20:50
To above ^: Why do you even show your code if you know that it sucks or if you're not even sure that it works?
pawn Код:
public OnPlayerConnect(playerid)
{
new IP1[16], IP2[16];
GetPlayerIp(playerid, IP1, sizeof(IP1));
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerIp(i, IP2, sizeof(IP2));
if(!strcmp(IP1, IP2, true))
{
new string[70];
format(string, sizeof(string), "Players [ID: %d] and [ID: %d] have the same IP. USE TEH BANHAMMORZ!", playerid, i);
for(new a = 0; a < MAX_PLAYERS; a++) if(IsPlayerAdmin(a)) SendClientMessage(a, COLOR_SOMECOOLCOLOR, string);
return 1;
}
}
return 1;
}