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

same! love this locksystem but the despawning vehicles is rough

@pusty Have you fixed this problem?
Rozwiązałeś to jakoś?

Error parsing script server.lua in resource LockSystem: server.lua:9: ‘)’ expected near ‘function’
Failed to load script server.lua.

Any help? @Deediezi

My problem has been fixed!

It’s 9th line in server.lua

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

Just add " , " after "ls:check" so it should be like this:

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

@Deediezi You need to fix your upload… In your stock upload you forgot to put the Comma in line 9 in the server.lua…

It should look like this…
AddEventHandler(“ls:check”, function(plate, vehicleId, isPlayerInside, notifParam)

Works great, @Deediezi ! Thank you!

Just two thing, can’t change the distance for locking/unlocking. Somehow, it stays always the same, aprox. 5 meters…

And last one, no option for allow grand theft auto for NPC vehicles. “local disableCar_NPC” doesn’t work for me. Looks like I will have to gut out the code myself :smile:

Can anyone give me a link to the latest version? plss

I have issue with implement this script into garage menu.

end of garage script (wher vehicle spawns):
PS. Script see correct plate right here

local plate = string.lower(owned.plate)
TriggerEvent('ls:newVehicle', nil, plate, nil)
TriggerEvent("ls:notify", "Vehicle plate: " .. plate, 0.2)

but in locksystem script

RegisterNetEvent("ls:newVehicle")
AddEventHandler("ls:newVehicle", function(id, plate, lockStatus)
	TriggerEvent("ls:notify", "Newvehicle script run s ", 0.2)
    if(plate)then
		TriggerEvent("ls:notify", "Get keys for car with plate:  " .. plate, 0.3)
        local plate = string.lower(plate)
        if(not id)then id = nil end
        if(not lockStatus)then lockStatus = nil end
        vehicles[plate] = newVehicle()
        vehicles[plate].__construct(id, plate, lockStatus)
    else
        print("Can't create the vehicle instance. Missing argument PLATE")
		TriggerEvent("ls:notify", "Wrong plate", 0.2)
    end
end)

Script tells me that plate is wrong (nothing in “plate” variable)

What i have wrong ?

I have the locksystem plugin and a esx_jb_advanced_truck_inventory when i want to open the inventory i just cant the plugin didnt see it . How can i fix that ?

Having an issue if you store your car in a garage and take it out again you lose the ablity to lock/unlock. You still get notifications of the vehicle locking or unlocking but nothing actually happens. Same thing happens if you travel to far away from it. Not to beat a dead horse but the despwaning issue still happens.

Future update

  • Possibility to give your keys to a player.

Can we have an update when this coming in pls?

Would be so great to have this feature :slightly_smiling_face:

Pascal

Latest verison of the mod has an error, you forgot a comma on server line 9 which makes the error:

Error parsing script server.lua in resource locksystem: server.lua:9: ‘)’ expected near ‘function’

Anyone got this to work with a vehicle inventory script? I somehow had it working but it broke and I don’t know why…

Script updated

Possible add the possibility to “remember” that I already have the keys for my owned car after I logout?

And what about those car inventory systems? Do they have to be fixed? Thanks!

There is no changelogs for the version 3.0.0 ?

Normally, the keys are given back upon reconnection (client). I don’t know if it works.
What script are you talking about?

No, I completely rewrote the whole script.

This seemed to work in an older version, but now it wont suddenly.

I mean car inventory scripts, like esx_jb_advanced_truck_inventory. After you locked your car and then unlocked you can’t open the trunk anymore.

Yeah, that’s weird. I’ll try to take a look as soon as I can. If you can give me (privately) a copy of your server / db (empty, of course) this could save me time to test.