Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- new string[128],ChaveCarro = PlayerInfo[playerid][pChave];
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "• |BVO.RPG| • Você foi kickado Automaticamente, Motivo: Se moveu Sem Logar!");
- Kick(playerid);
- return 1;
- }
- for( new i; i < sizeof StylerCar; i++ ){// Yiakin FEZ!!
- if( StylerCar[ i ] == vehicleid ){
- if( !ispassenger && GetPlayerOrg( playerid ) ^ 22 ){
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 || ( PlayerInfo[ playerid ][ pAdmin ] > 0 && admtrampando[ playerid ] == 0 ) ){
- ClearAnimations( playerid );
- SendClientMessage( playerid, -1, "Você não possui as chaves deste veiculo." );
- }
- }
- break;
- }
- }
- if( PlayerInfo[ playerid ][ pTimeBlock ] > gettime() ){
- new time, str[ 128 ];
- time = ( PlayerInfo[ playerid ][ pTimeBlock ] - gettime() )/60;
- format( str, sizeof str, "{EE0000}Sua conta esta bloqueado por %d minutos.", time );
- SendClientMessage( playerid, -1, str );
- new Float:p[ 3 ];
- GetPlayerPos( playerid, p[ 0 ], p[ 1 ], p[ 2 ] );
- SetPlayerPos( playerid, p[ 0 ], p[ 1 ], p[ 2 ] );
- RemovePlayerFromVehicleEx( playerid );
- return true;
- }
- //if(Engine[vehicleid] == 0 && !ispassenger)
- if(ispassenger == 0)
- {
- //if(CivisCarros(vehicleid) || SegurancasCarros(vehicleid) || AdvogadoCarros(vehicleid) || CaimnhoneiroCarros(vehicleid) || CoveiroCarros(vehicleid) || CarteiroCarros(vehicleid) || LixeiroCarros(vehicleid) || CarrosPlantacao(vehicleid) || CarrosColheta(vehicleid) || CarrosPesquisa(vehicleid) || PizzaboysCarros(vehicleid))
- new carro = GetPlayerVehicleID(playerid);
- new vehicle = GetPlayerVehicleID(playerid);
- new playerState = GetPlayerState(playerid);
- new mot, lu, alar, por, cap, porma, ob;
- if(carro != INVALID_VEHICLE_ID && playerState == PLAYER_STATE_DRIVER)
- {
- motor[playerid] = 0;
- GetVehicleParamsEx(vehicle, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
- SendClientMessage(playerid, 0xFFFFFFFF, "Veiculo: {228B22}Ligado!");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Motor desligado.Digite /motor para ligá-lo e /ajudaveiculo para saber os outros comandos !");
- return 1;
- }
- }
- if(ispassenger == 0)
- {
- for(new c = 0; c < sizeof(Carro); c++)
- {
- if(vehicleid == Carro[c][CarroID])
- {
- if(ChaveCarro == Carro[c][CarroID])
- {
- format(string, sizeof(string), "[BVO Veículo] {FFFFFF}%s Seja Bem Vindo em Seu Veículo, %s.", PlayerName(playerid),vehName[GetVehicleModel(ChaveCarro)-400]);
- SendClientMessage(playerid, 0x1E90FFFF, string);
- }
- else
- {
- format(string, sizeof(string), "[BVO Veículo] {FFFFFF}Este Veículo: %s, Pertence à %s.", vehName[GetVehicleModel(vehicleid)-400], Carro[c][Dono]);
- SendClientMessage(playerid, 0x77EEA1FF, string);
- if (PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16)
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Info: Você pode Apreender este Veículo, levando na HQ TOR e Digitando '/pcarro'!");
- }
- }
- break;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment