like this, but make sure you're using correct Model IDs.
PHP Code:
stock GetPlayerVehicleWeel(playerid, vehicleid)
{
static
Float:x,
Float:y,
Float:z;
if(IsABike(vehicleid))
{
// Behind left
GetVehicleWheelPos(vehicleid, WHEELSFRONT_LEFT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) return BIKE_TIRE_FRONT;
// Right back
GetVehicleWheelPos(vehicleid, WHEELSREAR_LEFT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) return BIKE_TIRE_REAR;
}
else
{
// Left front
GetVehicleWheelPos(vehicleid, WHEELSFRONT_LEFT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) return CAR_TIRE_FRONT_LEFT;
// Right Front
GetVehicleWheelPos(vehicleid, WHEELSREAR_LEFT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) return CAR_TIRE_REAR_LEFT;
// Middle left
GetVehicleWheelPos(vehicleid, WHEELSFRONT_RIGHT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) return CAR_TIRE_FRONT_RIGHT;
// Middle right
GetVehicleWheelPos(vehicleid, WHEELSREAR_RIGHT, x, y, z);
if (IsPlayerInRangeOfPoint(playerid, 1.2, x, y, z)) 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;
}
}