OnPlayerEnterVehicle bug
#6

Ah.. Maybe try use these 2 stock(s), would be much better.
PHP код:
stock IsAPoliceVehicle(vehicleid)
{
     switch(
GetVehicleModel(vehicleid)) 
           {
            case 
598599523: return 1// You can add more vehicles id if u add more cop vehicles.
           
}
           return 
0;

PHP код:
stock IsAParademicVehicle(vehicleid)
{
     switch(
GetVehicleModel(vehicleid)) 
           {
            case 
416: return 1// same applies here.
           
}
           return 
0;

Your final code should be this and should be working. (Haven't tested it but looks fine for me.)
PHP код:
public OnPlayerEnterVehicle(playeridvehicleidispassenger

    if(
IsAPoliceVehicle(vehicleid)) 
    { 
        if(
PlayerInfo[playerid][pFaction] != 1
        { 
            
ClearAnimations(playerid); 
            
GameTextForPlayer(playerid"~r~Nu esti autorizat sa conduci aceasta masina!"10003); 
        } 
        else return 
InCopCar[playerid] = 1
    } 
    else return 
InCopCar[playerid] = 0
  
    else if(
IsAParademicVehicle(vehicleid)) 
    { 
        if(
PlayerInfo[playerid][pFaction] != 2
        { 
           
ClearAnimations(playerid); 
           
GameTextForPlayer(playerid"~r~Nu esti autorizat sa conduci aceasta masina!"10003); 
        } 
        else return 
InParamedicCar[playerid] = 1
    } 
    else return 
InParamedicCar[playerid] = 0
  
    return 
1

Reply


Messages In This Thread
OnPlayerEnterVehicle bug - by AlexGheorghe - 05.06.2017, 11:59
Re: OnPlayerEnterVehicle bug - by DeeadPool - 05.06.2017, 14:37
Re: OnPlayerEnterVehicle bug - by AlexGheorghe - 05.06.2017, 14:58
Re: OnPlayerEnterVehicle bug - by DeeadPool - 05.06.2017, 15:08
Re: OnPlayerEnterVehicle bug - by AlexGheorghe - 05.06.2017, 15:19
Re: OnPlayerEnterVehicle bug - by DeeadPool - 05.06.2017, 15:31
Re: OnPlayerEnterVehicle bug - by CrossUSAAF - 05.06.2017, 15:39
Re: OnPlayerEnterVehicle bug - by AlexGheorghe - 05.06.2017, 19:06

Forum Jump:


Users browsing this thread: 1 Guest(s)