18.01.2014, 19:34
You have to pass the model as first parameter, not the vehicle ID:
Parameters: (https://sampwiki.blast.hk/wiki/GetVehicleModelInfo)
Parameters: (https://sampwiki.blast.hk/wiki/GetVehicleModelInfo)
pawn Код:
(vehiclemodel, infotype, Float:X, Float:Y, Float:Z)
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
switch(hittype)
{
case BULLET_HIT_TYPE_VEHICLE:
{
new Float:Offset[9], model = GetVehicleModel(hitid);
GetVehicleModelInfo(model, VEHICLE_MODEL_INFO_WHEELSFRONT, Offset[0], Offset[1], Offset[2]);
GetVehicleModelInfo(model, VEHICLE_MODEL_INFO_WHEELSREAR, Offset[3], Offset[4], Offset[5]);
GetVehicleModelInfo(model, VEHICLE_MODEL_INFO_PETROLCAP, Offset[6], Offset[7], Offset[8]);
printf("Front wheels: %f, %f, %f", Offset[0], Offset[1], Offset[2]);
printf("Read wheels: %f, %f, %f", Offset[3], Offset[4], Offset[5]);
printf("Petrol cap: %f, %f, %f", Offset[6], Offset[7], Offset[8]);
}
}
return 1;
}