Speed cap for all cars?


#1

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


#2

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


#3

Yeah i’m not sure how it will go


#4

Anyone have a max speed script? using setmaxspeed


#5

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)


#6

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.


#7

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


#8

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


#9

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


#10

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


#11

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


#12

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


#13

Use either github or upload files here as .rar

Thanks!


#14

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


#15

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?


#16

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


#17

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:


#18

so what lines do you copy to add vehicle limits