It was a while ago when i made this, but try this:
pawn Код:
new Float:SpikeX, Float:SpikeY, Float:SpikeZ; //This has to be used in the command as well as the OnPlayerUpdate callback, so create it outside of the cmd.
CMD:Spikes(playerid,params[])
{
#pragma unused params
GetPlayerPos(playerid, SpikeX, SpikeY, SpikeZ);
CreateObject(1212,SpikeX, SpikeY, SpikeZ,0.0,0.0,96.0);
return 1;
}
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 2.00, SpikeX, SpikeY, SpikeZ) && IsPlayerInAnyVehicle(playerid)) { //If the player is near the spikes, and he is in a car...
new panels, doors, lights, tires;
GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, 15); //15 will burst all tyres, change the number if you only want some tyres to pop.
}
return 1;
}
Compiles with no errors, but I haven't tested it
Hope I helped