警告
回调是在SA-MP 0.3a中添加的,在早期版本中不起作用!
提示
有关处理车辆损坏值的一些有用函数,请参阅此处

描述

当车门、轮胎、面板或灯等车辆元素改变其损坏状态时,将调用此回调。
姓名 描述
vehicleid 损坏状态已更改的车辆的 ID。
playerid 同步损坏状态变化的玩家的 ID(损坏或修理了汽车)。

返回

1 - 将阻止其他过滤器脚本接收此回调。 0 - 表示此回调将传递给下一个过滤器脚本。 它总是在过滤器脚本中首先被调用。

例子

  1. public OnVehicleDamageStatusUpdate(vehicleid, playerid)
  2. {
  3. // Get the damage status of all the components
  4. new panels, doors, lights, tires;
  5. GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  6. // Set the tires to 0, which means none are popped
  7. tires = 0;
  8. // Update the vehicle's damage status with unpopped tires
  9. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  10. return 1;
  11. }

笔记

提示
这不包括车辆健康状况的变化。