AloneZ

Untitled

Jun 9th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.83 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2. {
  3.     new string[128],ChaveCarro = PlayerInfo[playerid][pChave];
  4.     if(gPlayerLogged[playerid] == 0)
  5.     {
  6.         SendClientMessage(playerid, COLOR_LIGHTRED, "• |BVO.RPG| • Você foi kickado Automaticamente, Motivo: Se moveu Sem Logar!");
  7.         Kick(playerid);
  8.         return 1;
  9.     }
  10.     for( new i; i < sizeof StylerCar; i++ ){// Yiakin FEZ!!
  11.         if( StylerCar[ i ] == vehicleid ){
  12.             if( !ispassenger && GetPlayerOrg( playerid ) ^ 22 ){
  13.                 if( PlayerInfo[ playerid ][ pAdmin ] < 1 || ( PlayerInfo[ playerid ][ pAdmin ] > 0 && admtrampando[ playerid ] == 0 ) ){
  14.                     ClearAnimations( playerid );
  15.                     SendClientMessage( playerid, -1, "Você não possui as chaves deste veiculo." );
  16.                 }
  17.             }
  18.              break;
  19.         }
  20.     }
  21.     if( PlayerInfo[ playerid ][ pTimeBlock ] > gettime() ){
  22.         new time, str[ 128 ];
  23.         time = ( PlayerInfo[ playerid ][ pTimeBlock ] - gettime() )/60;
  24.         format( str, sizeof str, "{EE0000}Sua conta esta bloqueado por %d minutos.", time );
  25.         SendClientMessage( playerid, -1, str );
  26.         new Float:p[ 3 ];
  27.         GetPlayerPos( playerid, p[ 0 ], p[ 1 ], p[ 2 ] );
  28.         SetPlayerPos( playerid, p[ 0 ], p[ 1 ], p[ 2 ] );
  29.         RemovePlayerFromVehicleEx( playerid );
  30.         return true;
  31.     }
  32.     //if(Engine[vehicleid] == 0 && !ispassenger)
  33.     if(ispassenger == 0)
  34.     {
  35.              //if(CivisCarros(vehicleid) || SegurancasCarros(vehicleid) || AdvogadoCarros(vehicleid) || CaimnhoneiroCarros(vehicleid) || CoveiroCarros(vehicleid) || CarteiroCarros(vehicleid) || LixeiroCarros(vehicleid) || CarrosPlantacao(vehicleid) || CarrosColheta(vehicleid) || CarrosPesquisa(vehicleid) || PizzaboysCarros(vehicleid))
  36.              new carro = GetPlayerVehicleID(playerid);
  37.              new vehicle = GetPlayerVehicleID(playerid);
  38.              new playerState = GetPlayerState(playerid);
  39.              new mot, lu, alar, por, cap, porma, ob;
  40.              if(carro != INVALID_VEHICLE_ID && playerState == PLAYER_STATE_DRIVER)
  41.              {
  42.                  motor[playerid] = 0;
  43.                  GetVehicleParamsEx(vehicle, mot, lu, alar, por, cap, porma, ob);
  44.                  SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
  45.                  SendClientMessage(playerid, 0xFFFFFFFF, "Veiculo: {228B22}Ligado!");
  46.                  return 1;
  47.              }
  48.              else
  49.              {
  50.                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "Motor desligado.Digite /motor para ligá-lo e /ajudaveiculo para saber os outros comandos !");
  51.                  return 1;
  52.              }
  53.     }
  54.     if(ispassenger == 0)
  55.     {
  56.        for(new c = 0; c < sizeof(Carro); c++)
  57.        {
  58.             if(vehicleid == Carro[c][CarroID])
  59.             {
  60.                 if(ChaveCarro == Carro[c][CarroID])
  61.                 {
  62.                     format(string, sizeof(string), "[BVO Veículo] {FFFFFF}%s Seja Bem Vindo em Seu Veículo, %s.", PlayerName(playerid),vehName[GetVehicleModel(ChaveCarro)-400]);
  63.                     SendClientMessage(playerid, 0x1E90FFFF, string);
  64.                 }
  65.                 else
  66.                 {
  67.                     format(string, sizeof(string), "[BVO Veículo] {FFFFFF}Este Veículo: %s, Pertence à %s.", vehName[GetVehicleModel(vehicleid)-400], Carro[c][Dono]);
  68.                     SendClientMessage(playerid, 0x77EEA1FF, string);
  69.                     if (PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16)
  70.                     {
  71.                         SendClientMessage(playerid, COLOR_YELLOW,"Info: Você pode Apreender este Veículo, levando na HQ TOR e Digitando '/pcarro'!");
  72.                     }
  73.                 }
  74.                 break;
  75.             }
  76.         }
  77.     }
  78.     return 1;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment