spikes are not working
#6

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
Reply


Messages In This Thread
spikes are not working - by mailu - 05.01.2013, 15:06
Re: spikes are not working - by arakuta - 05.01.2013, 15:09
Re: spikes are not working - by AstonDA-G - 05.01.2013, 15:15
Re: spikes are not working - by mailu - 05.01.2013, 15:15
Re: spikes are not working - by Vince - 05.01.2013, 15:25
Re: spikes are not working - by AstonDA-G - 05.01.2013, 15:30
Re: spikes are not working - by ThePhenix - 05.01.2013, 15:30
Re: spikes are not working - by mailu - 05.01.2013, 21:25
Re: spikes are not working - by wouter0100 - 06.01.2013, 00:38
Re: spikes are not working - by hydravink - 06.01.2013, 00:46

Forum Jump:


Users browsing this thread: 1 Guest(s)