OnVehicleMod

From SA-MP Wiki

Jump to: navigation, search


This callback is called when a vehicle is modded.


Parameters:
(playerid, vehicleid, componentid)
playeridThe ID of the driver of the vehicle.
vehicleidThe ID of the vehicle which is modded.
componentidThe ID of the component which was added to the vehicle.


ReturnsReturn 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.


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 
        //(Tested and it works even on servers wich allow you to mod your vehicle using commands, menus, dialogs, etc..
    }
    return 1;
}

Related Functions

The following functions might be useful, as they're related to this callback in one way or another.


Related Callbacks

The following callbacks might be useful as well, as they're related to this callback in one way or another.

Personal tools