22.10.2013, 23:18
How to block players and hackers from being able to tune their car?
DisableInteriorEnterExits();
for(new i=0; i<12;i++)
{
new slot=-1
slot = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), i);
if(slot !=-1) RemoveVehicleComponent(GetPlayerVehicleID(playerid), i);
}
Check this include.
https://sampforum.blast.hk/showthread.php?tid=449016 Avoid tunning hack(Tunning a vehicle outside a garage) |
public OnVehicleMod(playerid,vehicleid,componentid)
{
if(GetPlayerInterior(playerid) == 0) // if when he tune his car he wasn't in int.
{
// action to do?
}
return 1;
}
pawn Код:
|