SA-MP Forums Archive
How to increase armor or speed on a car? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to increase armor or speed on a car? (/showthread.php?tid=140362)



How to increase armor or speed on a car? - Zack9764 - 08.04.2010

I would like to increase armor (so it takes longer to get to 0 and break down) or/and speed on a specific vehicle. How can I do this? Or is this even possible?


Re: How to increase armor or speed on a car? - dice7 - 08.04.2010

https://sampwiki.blast.hk/wiki/SetVehicleHealth
https://sampwiki.blast.hk/wiki/SetVehicleVelocity

Instead of the above SetVehicleVelocity function, you can use this custom one, which only requires the speed argument

pawn Код:
SetVelocityForward(vehicleid, Float:multi)
{
    new Float:angle, Float:velox, Float:veloy;
    GetVehicleZAngle(vehicleid, angle);
    velox = multi * floatsin(-angle, degrees);
    veloy = multi * floatcos(-angle, degrees);
    SetVehicleVelocity(vehicleid, velox, veloy, 0.01);
}



Re: How to increase armor or speed on a car? - Zack9764 - 08.04.2010

oh sweet thanks man!