[REQUEST] Speed Zone limit Script

Hey guys, im trying to find a script that when a vehicle enters a certain area, there speed is instantly capped at a certain speed until they leave the zone.

1 Like

Hi, Greenzones has the functionality you need

Hello , try this one with a distance check for your area like this :

local playerPed = PlayerPedId()
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(500)
        local Vehicle = GetVehiclePedIsUsing(playerPed)
        -- the GetDistanceBetweenCoords need your position, the position of the zone you want true or false for the z value and a radius after for checking your distance
        if GetDistanceBetweenCoords(GetEntityCoords(playerPed),vector3(0,0,0),true) < 50 then 
            SetVehicleMaxSpeed(Vehicle, 100.00) -- this value is *3.6 in gta V
        end
    end
end)

there’s more optimisation do to for the resmon part , but i know you will find it by yourself :wink:

This might also help with what you need, has some other nice features with it Scene Menu 2.0 | Traffic Policer

1 Like