06.03.2011, 00:55
No effect...
Edit: I added a debug...
This got printed:
Edit: I added a debug...
pawn Код:
public OnPlayerConnect(playerid)
{
//MySQL stuff here...
if(IsPlayerBanned(playerid))
{
return Kick(playerid);
}
else
{
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerAdmin(i) || PlayerData[i][AdminLevel] > 1)
{
printf("[DEBUG] %s Joined", PlayerName(i));
format(string,sizeof string,"%s(%d) Has joined %s (IP: %s)", PlayerName(playerid), playerid, SERVER_NAME, PlayerIP(playerid));
SendClientMessageToAdmins(COLOR_GREY, string);
return 1;
}
else
{
printf("[DEBUG] %s Joined", PlayerName(i));
format(string,sizeof string,"%s(%d) Has joined %s", PlayerName(playerid), playerid, SERVER_NAME);
SendClientMessageToAll(COLOR_GREY, string);
return 1;
}
}
return 1;
}
return 1;
}
Код:
A banned player connect: [02:59:06] Incoming connection: 5.229.94.154:51132 [02:59:06] [join] Unknown123 has joined the server (0:5.229.94.154) [02:59:06] [part] Unknown123 has left the server (0:2) [02:59:06] [DEBUG] Joined A player who is not banned connect: [02:59:06] Incoming connection: 5.229.94.154:51132 [02:59:06] [join] Unknown123 has joined the server (0:5.229.94.154) [02:59:06] [part] Unknown123 has left the server (0:2) [02:59:06] [DEBUG] Unknown123 Joined