[Ajuda] Anti Xiter
#5

No TOPO
pawn Код:
enum jInformacoes
{
   kNome[ 24 ],
   Nome[ 24 ],
   aAvisos,
   pAvisos,
   nMsgs,
   Preso
}
new jInfo[ MAX_PLAYERS ][ jInformacoes ];
new aProibidas[][] =
{
        {36},//HS Rocket
        {38},// minigun
        {35},//Rocket Launcher
        {40},//Detonator
        {37}//Flamethrower
};
new sStr[ 128 ];
forward @pArmas( playerid );
no GameModeInit ou no OnFilterScriptInit()
pawn Код:
SetTimer( "@pArmas", 500, true ); //500 = 5 milesimas de segundo (meio minuto)
pawn Код:
public OnPlayerConnect( playerid )
{
   GetPlayerName( playerid, jInfo[ playerid ][ Nome ], 23 );
   return true;
}
pawn Код:
public @pArmas( playerid )
{
   for( new X = 0; X < sizeof( aProibidas ); X++ )
   {
      if( GetPlayerWeapon( playerid ) == aProibidas[ X ][ 0 ] )
      {
         if( jInfo[ playerid ][ aAvisos ] == 1)
         {
            format( sStr, sizeof( sStr ), "[AlQaeda BoT] %s foi kickado do servidor! [Motivo: Uso de armas proibidas]", jInfo[ playerid ][ Nome ]);
            SendClientMessageToAll( Vermelho, sStr );
            SendClientMessage( playerid, Cinzento, "[AlQaeda BoT] %s Foi avisado 2 vezes antes, agora foi kickado ...");
            for( new j = 0; j <= MAX_PLAYERS; j++ )
            {
               if( IsPlayerConnected( j ) )
               {
                  if( IsPlayerAdmin( j ) )
                  {
                     SendClientMessage( j, Vermelho, sStr );
                  }
               }
            }
            Kick( playerid );
         }
         else if( jInfo[ playerid ][ aAvisos ] == 0 )
         {
            ResetPlayerWeapons( playerid );
            format( sStr, sizeof( sStr ), "[AlQaeda BoT] %s estб a usar armas proibidas, se usar mais 1 vez й kickado!", jInfo[ playerid ][ Nome ]);
            SendClientMessageToAll( Vermelho, sStr );
            SendClientMessage( playerid, Cinzento, "[AlQaeda BoT] Foi apanhado a usar armas proibidas, se usar mais 1 vez й kickado ...");
            jInfo[ playerid ][ aAvisos ] = 1;
            for( new j = 0; j <= MAX_PLAYERS; j++ )
            {
               if( IsPlayerConnected( j ) )
               {
                  if( IsPlayerAdmin( j ) )
                  {
                     SendClientMessage( j, Vermelho, sStr );
                  }
               }
            }
         }
      }
   }
   return true;
}
Crйditos Pelo COD: The Knight
Reply


Messages In This Thread
[Ajuda] Anti Xiter - by [Red]Maninho - 13.08.2011, 20:21
Re: [Ajuda] Anti Xiter - by Dr_Pawno - 13.08.2011, 20:23
Respuesta: [Ajuda] Anti Xiter - by [Red]Maninho - 13.08.2011, 20:25
Re: [Ajuda] Anti Xiter - by MiTToS - 13.08.2011, 20:27
Re: [Ajuda] Anti Xiter - by MaGnO_357 - 13.08.2011, 20:29
Respuesta: [Ajuda] Anti Xiter - by [Red]Maninho - 13.08.2011, 20:29
Re: [Ajuda] Anti Xiter - by MiTToS - 13.08.2011, 20:30
Re: [Ajuda] Anti Xiter - by MaGnO_357 - 13.08.2011, 20:34
Re: [Ajuda] Anti Xiter - by Gustavo_xP - 16.08.2011, 23:36
Re: [Ajuda] Anti Xiter - by [S]trong - 17.08.2011, 00:04

Forum Jump:


Users browsing this thread: 1 Guest(s)