警告
此回调是在SA-MP 0.3a中添加的,在早期版本中不起作用!
提示
有关处理车辆损坏值的一些有用函数,请参阅此处。
描述
当车门、轮胎、面板或灯等车辆元素改变其损坏状态时,将调用此回调。
姓名 |
描述 |
vehicleid |
损坏状态已更改的车辆的 ID。 |
playerid |
同步损坏状态变化的玩家的 ID(损坏或修理了汽车)。 |
返回
1 - 将阻止其他过滤器脚本接收此回调。
0 - 表示此回调将传递给下一个过滤器脚本。
它总是在过滤器脚本中首先被调用。
例子
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
// Get the damage status of all the components
new panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
// Set the tires to 0, which means none are popped
tires = 0;
// Update the vehicle's damage status with unpopped tires
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
return 1;
}
笔记
提示
这不包括车辆健康状况的变化。