O maximo, pq nгo sei onde estб o bug.
Код HTML:
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{ // 38 / 49 / 56 = SS
new newcar = GetPlayerVehicleID(playerid);
new oldcar = gLastCar[playerid];
new housecar = PlayerInfo[playerid][pPhousekey]+1;
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
if(IsABoat(newcar))
{
if(PlayerInfo[playerid][pBoatLic] < 1)
{
SendClientMessage(playerid,0xAA2000AA,"<!> Vocк nгo tem licenзa de navegaзгo.");
SetPlayerCriminal(playerid,255, "Navegando sem licenзa de navegaзгo");
}
}
else if(IsACarro(newcar))
{
if(PlayerInfo[playerid][pCarLic] < 1)
{
SendClientMessage(playerid,0xAA2000AA,"<!> Vocк nгo possui uma habilitaзгo.");
}
}
else if(CarroEvento(newcar))
{
SendClientMessage(playerid,0xAA2000AA,"<!> Vocк entrou em um veiculo de evento!");
}
else if(IsAPlane(newcar))
{
if(PlayerInfo[playerid][pFlyLic] < 1)
{
SendClientMessage(playerid,0xAA2000AA,"<!> Vocк nгo possui licenзa de Voo.");
SetPlayerCriminal(playerid,255, "Dirigindo sem licenзa de Voo");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,1);
Descongelar(playerid);
Desbug[playerid] = 0;
}
}
else
{
if(PlayerInfo[playerid][pCarLic] < 0)
{
if(PlayerDrunk[playerid] >= 5)
{
SetPlayerCriminal(playerid,255,"Drunk Driving");
}
}
else if(PlayerDrunk[playerid] >= 5)
{
SetPlayerCriminal(playerid,255,"Drunk Driving");
}
}//Confirmar with carro check
if(IsAPMCar(newcar))
{
if(IsAPM(playerid)) { }
else { RemovePlayerFromVehicle(playerid); }
}
if(IsAPMCar2(newcar))
{
if(IsAPM(playerid)) { }
else { RemovePlayerFromVehicle(playerid); }
}
else if(IsAnAmbulance(newcar))
{
if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { }
else { RemovePlayerFromVehicle(playerid); }
}
if(IsLosAztecas(newcar))
{
if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 5) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao e do Varrios Los Aztecas.");}
}
if(FARC(newcar))
{
if(PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == 6) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao e da Organizaзгo FARC.");}
}
if(CarroHotel(newcar))
{
if(PlayerInfo[playerid][pQuartoHotel] == 1) { }
else {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Carro disponivel apenas para Moradores do Hotel.");}
Descongelar(playerid);
}
if(CarroVip(newcar))
{
if(PlayerInfo[playerid][pPremio] >= 2) { }
else {
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Carro disponivel apenas para jogadores VIP.");}
}
if(CarroLadrao(newcar))
{
if(PlayerInfo[playerid][pEmprego] != 5)
SendClientMessage(playerid,COLOR_LIGHTBLUE,"USE: /roubarveiculo.");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
if(Corredores(newcar))
{
if(PlayerInfo[playerid][pLeader] == 14||PlayerInfo[playerid][pMember] == 14) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao faz parte dos Racers !.");}
}
if(IsVagos(newcar))
{
if(PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pMember] == 12) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao e dos Los Vagos.");}
}
if(IsGroove(newcar))
{
if(PlayerInfo[playerid][pLeader] == 15||PlayerInfo[playerid][pMember] == 15) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao e da Grove Street.");}
}
if(IsABallas(newcar))
{
if(PlayerInfo[playerid][pLeader] == 16||PlayerInfo[playerid][pMember] == 16) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Voce nao e dos Front Yard Ballas.");}
}
if(IsKingStreet(newcar))
{
if(PlayerInfo[playerid][pLeader] == 17||PlayerInfo[playerid][pMember] == 17) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_KINGS,"Voce nao й da Street King !");}
}
else if(IsAPizzaBike(newcar))
{
if(PlayerInfo[playerid][pEmprego] == 21) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_GREY,"Voce nao e a Entregador de pizza!");
}
}
else if(mecanicocarro(newcar))
{
if(PlayerInfo[playerid][pEmprego] == 7) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um Mecanico!");
}
}
else if(lixeirocarro(newcar))
{
if(PlayerInfo[playerid][pEmprego] == 11) { }
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um lixeiro!");
}
}
if(IsATruck(newcar))
{
if(PlayerInfo[playerid][pEmprego] == 16 || PlayerInfo[playerid][pEmprego] == 10)
{
format(string,sizeof(string),"Produtos: %d/%d",PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid,TEAM_GROVE_COLOR,string);
SendClientMessage(playerid,COLOR_WHITE,"Vocк pode fornecer produtos para as empresas e lucrar com isso.");
SendClientMessage(playerid,COLOR_WHITE,"INFO: Os comandos sгo: /produtos /Comprarprod /Venderprod");
}
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_GREY,"Voce nao e Caminhoneiro ou Entregador de Produto!");
}
}
if(IsATruckVip(newcar))
{
if(PlayerInfo[playerid][pEmprego] == 10)
{
format(string,sizeof(string),"Produtos: %d/%d",PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid,TEAM_GROVE_COLOR,string);
SendClientMessage(playerid,COLOR_WHITE,"Vocк pode fornecer produtos para as empresas e lucrar com isso.");
SendClientMessage(playerid,COLOR_WHITE,"INFO: Os comandos sгo: /produtos /comprarprod /venderprod");
}
else {
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й entregador de Produtos [VIP]!");
}
}
if(PlayerKarting[playerid] != 0)
{
new kart = GetPlayerVehicleID(playerid);
if(kart >=284 && kart <= 289)
{
PlayerInKart[playerid] = 1;
KartingPlayers ++;
}
}
if(IsABike(newcar))
{
if(PlayerInfo[playerid][pLevel] >= 3)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo й novato!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 77 && newcar <= 79)
{
if(PlayerInfo[playerid][pPilotar] == 0)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem autorizaзгo para Pilotar!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
return 1;
}
if(PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Guarda Nacional !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 24 && newcar <= 26)
{
if(PlayerInfo[playerid][pPilotar] == 0)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem autorizaзгo para Pilotar!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
return 1;
}
if(PlayerInfo[playerid][pMember] != 10 && PlayerInfo[playerid][pLeader] != 10)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Marinha !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
return 1;
}
}
if(newcar >= 171 && newcar <= 173)
{
if(PlayerInfo[playerid][pPilotar] == 0)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem autorizaзгo para Pilotar!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
return 1;
}
if(PlayerInfo[playerid][pMember] != 6 && PlayerInfo[playerid][pLeader] != 6)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da FARC !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 190 && newcar <= 200)
{
if(PlayerInfo[playerid][pMember] != 9 && PlayerInfo[playerid][pLeader] != 9)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й Reporter !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 195 && newcar <= 198)
{
if(PlayerInfo[playerid][pCargo] < 2)
{
SendClientMessage(playerid,COLOR_GREY,"Seu cargo й baixo!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
if(PlayerInfo[playerid][pMember] != 9 && PlayerInfo[playerid][pLeader] != 9)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й Reporter !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 73 && newcar <= 74)
{
if(PlayerInfo[playerid][pCargo] < 5)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 5 !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
if(PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Guarda Nacional !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 220)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 4 !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 221)
{
if(PlayerInfo[playerid][pCargo] < 5)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 5 !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 202)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 4 !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 241)
{
if(PlayerInfo[playerid][pCargo] < 5)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 5 !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 75 && newcar <= 76 )
{
if(PlayerInfo[playerid][pCargo] < 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й cargo acima de 3!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
if(PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Guarda Nacional !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 39 && newcar <= 52|| newcar == 266)
{
if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Polнcia Militar !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 492 && newcar <= 333)
{
if(SBizzInfo[24][sbProdutos] == 0)
{
SendClientMessage(playerid,COLOR_GREY,"Empresa de IPVA sem produtos");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 53 && newcar <= 66)
{
if(PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й da Polнcia Civil!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 57 && newcar <= 58|| newcar == 62|| newcar == 63|| newcar == 64)
{
if(PlayerInfo[playerid][pCargo] < 5)
{
SendClientMessage(playerid,COLOR_GREY,"Voce й cargo baixo!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
if(PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nгo й da Polнcia Civil!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 67 && newcar <= 81)
{
if(PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й da Guarda Nacional !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 176 && newcar <= 178)
{
if(PlayerInfo[playerid][pLeader] != 7 && PlayerInfo[playerid][pMember] != 7)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao й do Governo!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 166|| newcar == 184 || newcar == 185)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid,COLOR_GREY,"Voce й Cargo Baixo !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar == 42 || newcar == 43||newcar == 58 ||newcar == 59 ||newcar == 60 || newcar == 65|| newcar == 66|| newcar == 108|| newcar == 109|| newcar == 183|| newcar == 202)
{
if(PlayerInfo[playerid][pCargo] < 3)
{
SendClientMessage(playerid,COLOR_GREY,"Voce й Cargo Baixo !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 203 && newcar <= 212)
{
if(PlayerInfo[playerid][pEmprego] != 14)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um taxista !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 263 && newcar <= 265)
{
if(PlayerInfo[playerid][pEmprego] != 15)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um Jornaleiro !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 213 && newcar <= 214||newcar >= 308 && newcar <= 312)
{
if(TakingLesson[playerid] == 1) { }
else if(!Is26daNorte(playerid))
{
SendClientMessage(playerid,COR_DANORTE,"Voce nao e um 26 da Norte !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 257 && newcar <= 262)
{
if(PlayerInfo[playerid][pEmprego] != 17)
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um Pescador !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 179 && newcar <= 189)
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8){ }
else
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao e um Assassino !");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 190 && newcar <= 200)
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
else
{
SendClientMessage(playerid,COLOR_GREY,"Voce nao e Reporter!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
if(newcar >= 295 && newcar <= 300)
{
if(PlayerKarting[playerid] != 1)
{
RemovePlayerFromVehicle(playerid);
}
}
if(newcar >= 110 && newcar <= 152)
{
if (HireCar[playerid] != newcar)
{
format(string,sizeof(string),"~w~Voce pode alugar este veiculo~n~Valor:~g~$%d~n~~w~Para alugar digite ~g~/alugarveiculo~w~~n~Para sair digite ~r~/sair",SBizzInfo[0][sbEntranceCusta]);
TogglePlayerControllable(playerid,0);
GameTextForPlayer(playerid,string,5000,3);
}
}
for(new i = 1; i < sizeof(CarInfo); i++)
{
if(newcar == CarInfo[i][ownedvehicle])
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
new tgt[256];
if(CarInfo[i][cOwned]==0)
{
TogglePlayerControllable(playerid,0);
format(string,sizeof(string),"~g~Dono: %s~w~~n~Veiculo: %s~n~Preco: %d~n~~r~/auto comprar~n~~w~ou /sair",CarInfo[i][cOwner],CarInfo[i][cDescription],CarInfo[i][cValue]);
GameTextForPlayer(playerid,string,10000,5);
return 1;
}
if(strcmp(playername,CarInfo[i][cOwner],true) == 0)
{
format(tgt,sizeof(tgt),"Bem - Vindo ao seu veiculo %s , modelo: %s",CarInfo[i][cOwner],CarInfo[CheckOwner(playerid)][cDescription]);
SendClientMessage(playerid,COLOR_YELLOW,tgt);
return 1;
}
else
{
format(tgt,sizeof(tgt),"DONO: %s Modelo: %s",CarInfo[i][cOwner],CarInfo[i][cDescription]);
SendClientMessage(playerid,COLOR_YELLOW,tgt);
SendClientMessage(playerid,COLOR_WHITE,"Este carro nao e seu!");
RemovePlayerFromVehicle(playerid);
Descongelar(playerid);
}
}
}
if(oldcar != 301)
{
if((housecar != oldcar && oldcar != 300) && (HireCar[playerid] != oldcar && newcar != housecar))
{
if(gLastDriver[oldcar] == playerid && oldcar != newcar)
{
gLastDriver[oldcar] = 300;
gCarLock[oldcar] = 0;
UnLockCar(oldcar);
}
}
}
gLastCar[playerid] = newcar;
gLastDriver[newcar] = playerid;
}