Speed cap for all cars?

Hello i am looking for a speed cap script that will limit the cars to a max speed of 120 anyone know of one?

Can’t you just check if a player is in a vehicle then SetVehicleMaxSpeed can’t check if that exists, as I’m on my phone. But I’m sure it exists

1 Like

Yeah i’m not sure how it will go

Anyone have a max speed script? using setmaxspeed

Anyone know why it still is not working?```
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
getvehicle = vehicle
setmaxspeed(getvehicle, 50*2.25)
end
end)

https://runtime.fivem.net/doc/reference.html#_0x0E46A3FCBDE2A1B1

SET_ENTITY_MAX_SPEED ?

@Jake.ryan I think you need to call that function only once, not loop it.

He doesnt even define vehicle? Hed need to do GetVehiclePedIsUsing(PlayerPedId())

2 Likes

I know. Learning how to code should be his concern, not ours. We did help him by directing him to what he needed.

I wanted that tho, so i developed one my self…here you go :smiley:
https://mega.nz/#!3kFnVa7T!Jpz1aIonh5oRSpQzEKMyhkJ-1PUIFd4C5IQX3rOvZ1Y

@TKLeuPT Don’t send us to mega its not needed upload the files here.

How would we edit, it would we just change 250 to whatever we desire?

It is in kilometers, so if you change the 3.6 to whatever is miles and you change the cap which is 250 you can change to whatever you wan´t, 250 is the cap…
im solveing a bug with hydra wich does not go over 36 km/h

Use either github or upload files here as .rar

Thanks!

SpeedLimiter.rar (452 Bytes)
There you guys have it :smiley:

This is great for controlling ppl using speed-boost. Thank you.

Can you explain the conversion again? 1kph = ~0.62mph so what would I adjust the 3.6 to for mph?

1 Like

i am going to update it and upload it to github when i’ve done it i’ll leave here my github

Well as i said, im leaving here my github to the speed limiter.


I fixed the Hydra, and i added kmh and mph…
you just need to change the variable :smiley:
I would like to have credits if you guys could give me :smiley:

so what lines do you copy to add vehicle limits

so onfused, can you check this, basicly ive slowed down all cars to 86mph and made police faster , can you check it pleaseclient.lua (14.8 KB)

if you released a script please post it as a release instead of continueing in this one.