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

Nice news :slight_smile: Always good to see a dev working on a project still.

1 Like

The new version will come during the week. There are several good news as :

  • Possibility to give your keys with a command. (Functional)
  • Only the main owner of the vehicle can give his keys. (Functional)
  • Can’t get out of a closed vehicle. (Functional)
  • The player no longer breaks the windows of his vehicle. (Functional)
  • Lucky system to find the keys. (50% by default but can be modified). (Functional)
  • InteractSound is no longer required, LockSystem has now its own sound system. (To do)
  • New sounds. (To do)
  • Automatic verification for updates. (Functional)
  • Timer for open / close the doors. (Can be modified / disabled). (Functional)

I have maybe forget some things but I hope you like it ! See you soon :wink:

Edit : Progress update … and one new feature ! If you want the integration of one of your ideas, tell me!

8 Likes

@Deediezi
Still waiting for update ;_;

didnt work for me it get this error in console —> Error parsing script server.lua in resource LockSystem: server.lua:9: ‘)’ expected near ‘function’

pls make a Inventory system with nativeui for vrp it would be great

Yea i’m so sorry ! I have a problem with the lock / unlock when a player is inside the vehicle. I need to search what’s wrong but i found nothing … Maybe it’s the FiveM or Fx cause. I keep you informed … :slight_smile: (That’s the latest thing i need to do)

Here the LockSystem ALPHA v2.1 (32.1 KB)
Tell me how you find it and tell me the problems :wink:
If someone gets to fix the problem it will be credited in the script.

You can configure the script inside the config/shared.lua file and you can use /gk [id] [plate] for give your key to a player. No distance check at the moment but coming soon (need to fix this fking problem in first)

Whats wrong with it?

Lock / unlock bug when a player is inside the car you target… And I don’t know why for the moment … All seems good …

So when you are inside the vehicle the lock/unlock doesn’t work or is it something else?

The problem is that the script will decide to lock several times instead of the unlock for example.
I get the lockstatus before each request so I do not understand. I’ve tried a lot of stuff but nothing has worked at the moment.

RegisterNetEvent('ls:lock')
AddEventHandler('ls:lock', function()
	Citizen.CreateThread(function()
		if(time > timer)then
			if(lockStatus == 4 or lockStatus == 2)then
				SetVehicleDoorsLocked(vehicle, 0)
				Notify('Vehicle unlocked')
				TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 10, "unlock", 1.0)
			elseif(lockStatus == 0 or lockStatus == 1)then
				SetVehicleDoorsLocked(vehicle, 4)
				Notify('Vehicle locked')
				TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 10, "lock", 1.0)
			end
			time = 0
		else
			Notify('You have to wait '..(timer / 1000)..' seconds')
		end
	end)
end)

Hm. So say if I was to test this. I unlock the vehicle. When another player gets in the vehicle it doesn’t lock/unlock correctly or does it also occur when you get in and out of the vehicle? Sorry, I am trying to think of some ways to fix it :smiley:

didnt work for me every car on the street is locked and when i press the button nothing happens

Okay sure keep me informed and thank’s for all ! I’m sorry i don’t have the time yet …

@BEn_s_Lounge You juste have to configure your config/shared.lua file

@Deediezi how ???

Open config/shared.lua

i cant find this file

pls help me!!!

Oh you use the old version ? There is a new version in alpha here :

wheres the config didt the script create the file when i start the server

I’m currently looking for a developer who can help me develop this script because i’m short of time.