[Release][UNMAINTAINED] LockSystem 3.1 (Updated the 07/16/2018) [BETA]

@Deediezi I will try that and write then if it works or not, thx for the fast support!

GreetZ
NebelRebell

Keep me informed, please! It will be easier for me to integrate it into the script if I have the answer :slight_smile:

The new version is coming soon…

@Deediezi forgot your answert…

…We use your Locksystem plus VehControl2 and esx_vehicle_inventory. If we get a car, the trunk can be opend with “L” and get stuff out or put stuff in. All time its working…UNTIL…we lock the car. Then its closed…nice! But by unlocking the car the Trunk stay locked and only this. All other doors can be opend.

Maybe its a bug in the script of esx_vehicle_inventory I’m not sure or in your script is missing the “Door Trunk”.

1 Like

I have this error

He’s visually blocked? Otherwise, invokes the native that allows to open it at the desired time

But your script is running

Where we can download the 3.0 ?

I have “A new version is available Current 2.1 Latest : 3.0” ?

Thanks for the work and the support :slight_smile:

1 Like

I’m working on it! I didn’t mean to! It’s coming soon… :wink:

Come on… Some nice code :

is there a way to set the percentage how many parking cars are locked?
we have too much unlocked cars on our server at the moment…

any body have this problem Error parsing script server.lua in resource LockSystem: server.lua:9: ‘)’ expected near ‘function’

1 Like

Yeah, I am and I can’t figure it out.

its easy fix add me on discord i will help you with it 1K-23 Lazaro.B#1080


How to fix this here?

Show your server.lua line 9, 10, and 11

You don’t have a comma in the ls:check event

AddEventHandler("ls:check", function(plate, vehicleId, isPlayerInside, notifParam)

Needs to be like that.

Really nice script all works good :smiley:

the script works great the only problem i have is that you cant steal ai cars and ive tried everything

Yes i have the same issue… I try to modify the line

local disableCar_NPC = false -- Set to false for enable NPC's car

Edit : In the LockSystem/client.lua

But he doesn’t change anything, we can’t take AI cars or a random car on the map…

Then remove the ai car code.

Either remove this

if not enableCar_NPC then
	Citizen.CreateThread(function()
    	while true do
			Wait(0)

			local player = GetPlayerPed(-1)

	        if DoesEntityExist(GetVehiclePedIsTryingToEnter(PlayerPedId(player))) then

	            local veh = GetVehiclePedIsTryingToEnter(PlayerPedId(player))
	            local lock = GetVehicleDoorLockStatus(veh)

	            if lock == 7 then
	                SetVehicleDoorsLocked(veh, 2)
	            end

	            local pedd = GetPedInVehicleSeat(veh, -1)

	            if pedd then
	                SetPedCanBeDraggedOut(pedd, false)
	            end
	        end
	    end
	end)
end

Or comment it like this

--[[
if not enableCar_NPC then
	Citizen.CreateThread(function()
    	while true do
			Wait(0)

			local player = GetPlayerPed(-1)

	        if DoesEntityExist(GetVehiclePedIsTryingToEnter(PlayerPedId(player))) then

	            local veh = GetVehiclePedIsTryingToEnter(PlayerPedId(player))
	            local lock = GetVehicleDoorLockStatus(veh)

	            if lock == 7 then
	                SetVehicleDoorsLocked(veh, 2)
	            end

	            local pedd = GetPedInVehicleSeat(veh, -1)

	            if pedd then
	                SetPedCanBeDraggedOut(pedd, false)
	            end
	        end
	    end
	end)
end
--]]