Код:
public OnPlayerConnect( playerid )
{
if( !IsPlayerNPC( playerid ))
{
if( GetPlayerPing( playerid ) <= 0 )
return Kick( playerid ), 1;
}
if( CountIP( GetIP( playerid )) >= 10 )
{
return BanAll( playerid ), 0;
}
if( !IsValidNick( PlayerName( playerid )) )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк utilizou um caractйre invбlido no seu Nick / Nome !" );
SendClientMessage( playerid, COLOR_AMARELO, "[ ~ ] Sгo permitidos os seguintes caractйres:" );
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] De A/a a Z/z e _ ." );
SendClientMessage( playerid, COLOR_AMARELO, "[ ~ ] Exemplos de Nick-Nome: Nome.SobreNome, NomeSobrenome, Nome_SobreNome ou Nome" );
return Kick( playerid ), 1;
}
if( dini_Int( f( playerid ), "Banido" ) == 1 )
{
SendClientMessage( playerid, 0xFFFFFFAA, "[ x ] Vocк estб banido(a) !" );
SendClientMessage( playerid, 0xFFFFFFAA, "[ x ] Vб atй nosso fуrum para tentar resolver seu caso, segue o link abaixo." );
SendClientMessage( playerid, 0xFFFFFFAA, "[ x ] Link url: {6699CC}www.BwTgames.com" );
SetTimerEx( "Banido", 1125, false, "d", playerid );
}
else
{
pInfo[ playerid ][ Logado ] = false;
SetPlayerColor( playerid, 0xFFFFFFAA );
TextDrawHideForPlayer( playerid, Viva_Vida );
TextDrawShowForPlayer( playerid, BwT_Games );
TextDrawHideForPlayer( playerid, BarraPreta );
TextDrawHideForPlayer( playerid, InfoSite );
TextDrawHideForPlayer( playerid, InfoPlayer[ playerid ] );
TextDrawHideForPlayer( playerid, statsShop );
TextCreatePlayer( playerid );
for( new t; t < 4; t++ )
{
TextDrawHideForPlayer( playerid, TextAnuncio[ t ] );
}
ResetPlayerWeapons( playerid );
PlayAudioStreamForPlayer( playerid, "http://74.222.1.212:13978" );
LimparChat( playerid, 30 );
SendClientMessage( playerid, COLOR_BRANCO, "Carregando dados..." );