static n[24];GetPlayerName(playerid, n, 24);
if(!strcmp(n,"con", true)) return Kick(playerid);
new AntiNomeBot[][] =
{
"con.",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"nul",
"clock$",
"aux",
"prn",
"con",
"Carl",
"Rocky",
"Pepe",
"Arnoldo",
"SgtPepper",
"Pepsi",
"Pepno",
"Azucar",
"Vino_Toro",
"Zoquete",
"Pacman",
"Batman",
"AquilesBrinco",
"Manfrey",
"Sopapeala",
"Papirola",
"Sony",
"[ViP]Labrik",
"Justin_Bieber",
"Poderoso_Chefao",
"[MT]Lavis",
"Gil_Henrique",
"Server_Lixo",
"Justin_Biba",
"Justin_Viadinho",
"Advanced_Lixo"
};
//On PlayerConnect.
new nomedocara3[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomedocara3, sizeof(nomedocara3));
for(new n; n < sizeof(AntiNomeBot); ++n)
{
if(!strcmp(nomedocara3, AntiNomeBot[n], true))
{
BanEx(playerid, "NOOOB nukando o server,[ricop522].");
return 1;
}
}
TheGarfield desculpe esqueci de avisar aonde coloco isso
so novato |
enum Names
{
Name[24]
}
new NickName[][Names] =
{
{"aux"},
{"con"},
{"com1"},
{"com2"},
{"com3"}
};
public OnPlayerConnect( playerid )
{
new Nome[ 24 ];
GetPlayerName( playerid, Nome, sizeof( Nome ) );
for( new i = 0; i <= sizeof NickName; i++ )
{
if( strfind( Nome, NickName[ i ][ Name ], true ) != -1 )
{
if( strlen( Nome ) == strlen( NickName[ i ][ Name ] ) )
{
SendClientMessage( playerid, 0xFFF000AA, "Nick proibido no servidor :/" );
SendClientMessage( playerid, 0xFFF000AA, "Entre com outro nick para poder jogar (:" );
Kick( playerid );
}
}
}
return true;
}
new NickName[][Names] = ...
enum Names
{
Name[24]
}
new NickName[][Names] =
{
{"aux"},
{"con"},
{"com1"},
{"com2"},
{"com3"}
};