L-am testa si nu merge. Acesta ii mai bun si puteti adauga cate nickname-uri vreti.
public OnPlayerConnect(playerid)
{
playerLoginAttempts[ playerid ] = 0;
new
szPlayerName[ MAX_PLAYER_NAME ];
bIllegalPlayer[ playerid ] = false;
GetPlayerName( playerid, szPlayerName, MAX_PLAYER_NAME );
if ( !strcmp( szPlayerName, "com", true, 3 ) || !strcmp( szPlayerName, "lpt", true, 3 ) )
{
if ( szPlayerName[ 3 ] >= '0' && szPlayerName[ 3 ] <= '9' && szPlayerName[ 4 ] == '\0' )
return aKick( playerid, szPlayerName );
}
else if ( !strcmp( szPlayerName, "clock$", true, 6 ) )
return aKick( playerid, szPlayerName );
else
{
static const
szForbiddenName[ ][ ] =
{
"nul", "aux",
"prn", "con",
"Carl", "Rocky",
"Pepe", "Arnoldo",
"SgtPepper", "Pepsi",
"Pepno", "Azucar",
"Vino_Toro", "Zoquete",
"Pacman", "Batman",
"AquilesBrinco", "Manfrey",
"Sopapeala", "Papirola",
"[Vip]Labrik", "[MT]Lavis", "Sony",
"[RO]", "[SWAT]", "[FAZ]", "Asshole",
"Admin", "Wanker", "Sex", "Sexy", "[RUS]", "[SAE]",
"netzeek", "Admin"
}
;
for ( new i = 0; i < sizeof( szForbiddenName ); i++ )
{
if ( !strcmp( szPlayerName, szForbiddenName[ i ], true, 3 ) )
return aKick( playerid, szPlayerName );
}
#if _CHANGE_NAME_BEFORE_KICK == true
// Numele jucatorului dat afara va fi "___________".
if ( !strcmp( szPlayerName, szTmpKickName, true, MAX_PLAYER_NAME ) )
return aKick( playerid, szPlayerName );
#endif
}
return 1;
}
Iar acest cod, il puneti oriunde in script. (mai bine la sfarsit)
stock
bool: bIllegalPlayer [ MAX_PLAYERS ] = false,
szTmpKickName [ MAX_PLAYER_NAME ];
Codul ii din filterscriptul meu, impotriva codatilor si fraierilor. (AntiCheat) Am sters cateva cuvinte .... Unii stiu care sunt alea.. :)