26.02.2012, 08:31
pawn Код:
public OnPlayerConnect(playerid)
{
// Crash Fix - GhoulSlayeR
InvalidNameCheck(playerid);
new playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
SetPlayerName(playerid, "BannedPlayer");
SendClientMessage(playerid, COLOR_RED, "SERVER: You are banned from this server.");
Kick(playerid);
return 1;
}
if(IsPlayerNPC(playerid)) return 1;
TotalConnect++;
PlayersConnected++;
if(PlayersConnected > MaxPlayersConnected)
{
MaxPlayersConnected = PlayersConnected;
gettime(MPHour,MPMinute);
getdate(MPYear,MPMonth,MPDay);
}