[Ajuda] FS Anti-Nick
#6

pawn Код:
#include a_samp

new NomesProibidos[35][MAX_PLAYER_NAME] =
{
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"Carl",
"Rocky",
"Sony",
"clock$",
"prn",
"nul",
"con",
"Azucar",
"CON",
"con",
"con1",
"aux",
"aux1",
"prn",
"PRN",
"AUX",
"Caio_Freeze"
};

public OnPlayerConnect(playerid)
{
    for(new i; i<sizeof(NomesProibidos); i++)
    {
        new Nome[40];
        new String[128];
        new Nick[MAX_PLAYER_NAME];
        GetPlayerName(i,Nome,sizeof(Nome));
        GetPlayerName(playerid, Nick, sizeof(Nick));
        if(!strcmp(Nick, NomesProibidos[i], true)){
        SendClientMessage(i, 0xFFFF00AA, "[INFO-NICK] Vocк Foi Banido/Kickado Do Servidor Por Usar Um Nick Proibido!");
        BanEx(i, "-=[Nick Proibido]=-");
        format(String, sizeof(String), "[Anti Nick's] O Jogador %s Foi Kickado/Banido Por Tentar Entrar Com Nick Proibido", Nome);
        SendClientMessageToAll(0xFF0000AA, String);
        WriteLog("NicksProibidos", String);
    }
    return 1;
}

stock WriteLog(filename[],text[])
{
    printf("%s => %s", filename, text);
    new File:file;
    new filepath[256], string[128], year,day,month, hour,minute,second;
    getdate(year,day,month); gettime(hour,minute,second);
    format(filepath,sizeof(filepath),"/Anti-Nicks/%s.log",filename);
    file = fopen(filepath,io_append);
    format(string,sizeof(string),"[%02d/%02d/%d|%02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second,text);
    fwrite(file,string);
    fclose(file);
    return 1;
}
Reply


Messages In This Thread
[Ajuda] FS Anti-Nick - by Caio_Freeze - 26.04.2012, 16:32
Re: [Ajuda] FS Anti-Nick - by Don_Speed - 26.04.2012, 16:47
Re: [Ajuda] FS Anti-Nick - by Caio_Freeze - 26.04.2012, 16:49
Re: [Ajuda] FS Anti-Nick - by Don_Speed - 26.04.2012, 16:52
Re: [Ajuda] FS Anti-Nick - by Caio_Freeze - 26.04.2012, 16:54
Re: [Ajuda] FS Anti-Nick - by RoacH` - 26.04.2012, 16:58
Re: [Ajuda] FS Anti-Nick - by SuB_ZeRo0_ - 26.04.2012, 17:02
Re: [Ajuda] FS Anti-Nick - by rodrigooo - 26.04.2012, 17:02
Re: [Ajuda] FS Anti-Nick - by Caio_Freeze - 26.04.2012, 17:07
Re: [Ajuda] FS Anti-Nick - by RoacH` - 26.04.2012, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)