[Release] Simple Vehicle Control Script

Can you do that with hotkeys?

How i can put this actions only in owned vehicles?

how do i get the v0.2 update

For some reason this doesnt work at all for me. When i type every single command in the script it gives me

“no such command”

Any ideas? Ive made sure to add it in my server.cfg and everything like that.

Idea for a new feature:

A command to toggle on and off a proximity locking mechanism. Example: A person is 20 ft away and the vehicle is locked, when the person goes withing 10 ft. the vehicle automatically unlocks. Purpose: For LEOs. When they approach their vehicles, instead of having to type in /lock they can just walk up to it. IRL example: It is not technically the same thing but I am pretty sure I have heard of the 2016 ford explorers doing this. https://www.tremcopoliceproducts.com/ https://www.pro-gard.com/product/safe-stop-vehicle-anti-theft/

/rdoors: Opens and closes the two rear doors. (Mostly for use in vans)

can you add that som you can ID the car doors. Bacuse i want to open all the dors, not just the back once

Did you get the asnwer?

+1 plss

Just comment out the the first four lines in esx_rpchat sever main.lua file.

Is there any way to change the engine command to “/eng”? I tried to change this in the server.lua. But it didn’t work, but also didn’t spit back any errors.

Thanks in advance!

is the spotlight for LEO in yet?

Hi

Newb here. Thanks for sharing this simple yet awesome script.

I’m trying to make the attached trailer door to pop out its rear door (spawned “trailers2” cause it suppose to have interior and workable door)

So I add this line in client.lua and also added RegisterCommand in server.lua

-- B A C K  D O O R S --
RegisterNetEvent('back')
AddEventHandler('back',function() 
	local player = GetPlayerPed(-1)
    		if controlsave_bool == true then
				local vehicle = saveVehicle
				local trailer = saveVehicle2
			else
				vehicle = GetVehiclePedIsIn(player,true)
				local trailer = GetVehicleTrailerVehicle(vehicle)
			end
			local isopen = GetVehicleDoorAngleRatio(trailer,2) and GetVehicleDoorAngleRatio(trailer,3)
			local distanceToVeh = GetDistanceBetweenCoords(GetEntityCoords(player), GetEntityCoords(vehicle), 1)
			
			if distanceToVeh <= interactionDistance then
				if (isopen == 0) then
				SetVehicleDoorOpen(trailer,2,0,0)
				SetVehicleDoorOpen(trailer,3,0,0)
				else
				SetVehicleDoorShut(trailer,2,0)
				SetVehicleDoorShut(trailer,3,0)
				end
			else
				ShowNotification("~r~You must be near your vehicle to do that.")
			end
end)

but still no success. Have any idea to make this work?

Hey, How do you spawn the vehicle you save? I only see /save is it /sveh? Thanks

it says no such a command
Fix IT
pls

vehicle-control.rar (1.5 KB)
there you go, the same script i edited because i had the same error too
the only thing is you have no ability to lock and save the car because i didn’t need it at the time

Hello, a query how do I do so that the cars do not start automatically?

Then I turn my engine off and get out the car the lights flash constantly. anyone know why this is happening?

How to register the command in my chat?

any update on the spotlight?

how do i make it so the cars are “auto” saved no need to use command?