OnPlayerConnect
#2

nvm,
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[24],ip[16];
    GetPlayerIp(playerid,ip,sizeof ip);
    GetPlayerName(playerid,name,sizeof name);
    for(new id; id < 24; id++)
    {
        if(!strcmp(name,TempBans[id][BannedName]))
        {   // ban type is name
            SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!");
            Kick(playerid);
            return 1;
        } else if(!strcmp(ip,TempBans[id][BannedIP]))
        {   // ban type is ip !
            SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!");
            Kick(playerid);
            return 1;
        }
    }

    SendClientMessage(playerid, -1, "Welcome to the serva!);
    return 1;
}
Doesn't this work?
Reply


Messages In This Thread
OnPlayerConnect - by Kingunit - 12.08.2011, 13:17
Re: OnPlayerConnect - by iPLEOMAX - 12.08.2011, 13:29
Re: OnPlayerConnect - by Kingunit - 12.08.2011, 13:34
Re: OnPlayerConnect - by iPLEOMAX - 12.08.2011, 13:37
Re: OnPlayerConnect - by Kingunit - 12.08.2011, 13:46

Forum Jump:


Users browsing this thread: 2 Guest(s)