描述
改装车辆时会调用此回调。
| 姓名 |
描述 |
| playerid |
车辆驾驶员的 ID。 |
| vehicleid |
改装车辆的 ID。 |
| componentid |
添加到车辆的组件的 ID。 |
返回
它总是在游戏模式中首先被调用,因此返回 0 也会阻止其他过滤器脚本看到它。
例子
public OnVehicleMod(playerid,vehicleid,componentid){ printf("Vehicle %d was modded by ID %d with the componentid %d",vehicleid, playerid,componentid); if (GetPlayerInterior(playerid) == 0) { BanEx(playerid, "Tuning Hacks"); // Anti-tuning hacks script return 0; // Prevents the bad modification from being synced to other players //(Tested and it works even on servers wich allow you to mod your vehicle using commands, menus, dialogs, etc.. } return 1;}
笔记
提示
此回调不是由 AddVehicleComponent 调用的。