Do not repair a motorcycle tire
#4

like this, but make sure you're using correct Model IDs.
PHP Code:
stock GetPlayerVehicleWeel(playeridvehicleid)
{
    static
        
Float:x,
        
Float:y,
        
Float:z;
 
    if(
IsABike(vehicleid))
    {
        
// Behind left
        
GetVehicleWheelPos(vehicleidWHEELSFRONT_LEFTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return BIKE_TIRE_FRONT;
    
        
// Right back
        
GetVehicleWheelPos(vehicleidWHEELSREAR_LEFTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return BIKE_TIRE_REAR;
    }
    else
    {
        
// Left front
        
GetVehicleWheelPos(vehicleidWHEELSFRONT_LEFTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return CAR_TIRE_FRONT_LEFT;
     
        
// Right Front
        
GetVehicleWheelPos(vehicleidWHEELSREAR_LEFTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return CAR_TIRE_REAR_LEFT;
     
        
// Middle left
        
GetVehicleWheelPos(vehicleidWHEELSFRONT_RIGHTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return CAR_TIRE_FRONT_RIGHT;
     
        
// Middle right
        
GetVehicleWheelPos(vehicleidWHEELSREAR_RIGHTxyz);
        if (
IsPlayerInRangeOfPoint(playerid1.2xyz)) return CAR_TIRE_REAR_RIGHT;    
    }
    return -
1;
}

stock IsABike(vehicleid)
{
    
//u can make a switch or create new array for bike model ids.
    
switch(GetVehicleModel(vehicleid))
    {
        case 
WayfarerModelID: return true//change that values to the actual bike model IDs
        
case FreewayModelID: return true; ..
        default: return 
false;
    }

Reply


Messages In This Thread
Do not repair a motorcycle tire - by Corin - 07.07.2019, 19:11
Re: Do not repair a motorcycle tire - by Mugala - 08.07.2019, 08:01
Re: Do not repair a motorcycle tire - by Corin - 11.07.2019, 02:26
Re: Do not repair a motorcycle tire - by Mugala - 11.07.2019, 06:48

Forum Jump:


Users browsing this thread: 3 Guest(s)