SA-MP Forums Archive
Limit vehicle topspeed - 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)
+--- Thread: Limit vehicle topspeed (/showthread.php?tid=610177)



Limit vehicle topspeed - MayaEU - 20.06.2016

I have been wondering if there is a Way to
Limit the vehicles topspeed?😊


Re: Limit vehicle topspeed - F1N4L - 20.06.2016

Create a timer and verify the car velocity with this function: GetVehicleVelocity


Re: Limit vehicle topspeed - XVlaDX - 20.06.2016

Код:
foreach(new vehicleid : Vehicles)
{
new topspeed = 100;
if(GetVehicleVelocity(vehicleid) > topspeed)
{
SetVehicleVelocity(vehicleid) = topspeed;
}
}
Hope you get the idea.


Re: Limit vehicle topspeed - Lynn - 20.06.2016

Hopefully these three links will help you achieve your goal.

https://sampwiki.blast.hk/wiki/GetVehicleVelocity
https://sampwiki.blast.hk/wiki/SetVehicleVelocity
https://sampforum.blast.hk/showthread.php?tid=364124