SA-MP Forums Archive
Speed Stop - 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: Speed Stop (/showthread.php?tid=126300)



Speed Stop - friped93 - 07.02.2010

Hey. I wonder if there's any way that if i want the car to go max in ex 50mp/h it wont go faster is there any way to make that posible? becouse that would be great if there is.


Re: Speed Stop - mansonh - 07.02.2010

Yep,

create a timer, if player is over a certain speed, setvehiclevelocity to that max speed.



Re: Speed Stop - Joe Staff - 07.02.2010

Timers are too slow for this, it will cause the player to speed, then slow down, then speed up, then slow down. (It's weird)
If you use OnPlayerUpdate, it's too fast and causes a wee bit of lag. (Still funny to fall off a building at 5mph...)


Re: Speed Stop - mansonh - 07.02.2010

You can use timers, aslong as you do % reduction in speed, yah it can look a little weird, but it works.

I use it in reverse, at higher speeds its not noticeable, but at 50mph it might be.


Re: Speed Stop - friped93 - 07.02.2010

yeah did just find that out was testing some stuff my self that i found and the SetVehicleVelocity Worked perfect =) Thanks for the help anyway =)