ESX Lock NPC cars

Hello, im using ESX and i want to make all NPC cars locked. Even parked ones, basically, LockSystem 3.1 locks only driving cars so thats not really what i need. Is there different script that locks both - parked and driving? Thanks

3 Likes

did you used the searchbutton?

1 Like

yes i did, basically most of them are only for driving npc cars, im looking for parked ones

and this:

did not working?

couldnt understand how to install it

Add - nocarjack in your AutoStartResources ( citmp-server.yml )

yeah sorry this is the old name of server.cfg

just add

start nocarjack

in your config

i tried it, it says couldnt find resource nocarjack :man_shrugging:

nocarjack has some issues but it does a pretty decent job.

if you kick a car the person still gets out and fights so you can just take the car that way. to change this you have to change the ai behavior.

if its someone on a motorcycle you can just punch them off and take the bike. there may be a way to detect the event of ped falling off a motorcycle, and lock the doors when that happens

if you solve the AI getting out of cars, you can usually stil shoot the ped throught the window and when they are dead on the stearingwheel you can then brake the glass, open the door,d rag them out and get inside.

also doors that have been left open sometimes let you get in. also vehicles that spawn organically like Ambulances spawned to help an npc are not locked.

also, cars spawned in the “rare car spawns” locations are not locked.

also

anyway its a pretty good start / skeleton

unfortunately its biggest issue is that it causes major problems with most vehicle door lock scripts.

so have fun !

same here, for some reason it wont work at all, doesn’t even have a __resource.lua file

2 Likes

I know why, cause in old mods / scripts & resources, they are using a manifest file who’s called _resource.lua.

You should replace this name of file by ‘fxmanifest.lua’
Here is a template for this file :

fx_version 'adamant'

game 'gta5'

description 'Default'

-- Delete this line if you are not using ESX_legacy
shared_script '@es_extended/imports.lua'

server_scripts {
	'server/main.lua'
}

client_scripts {
	'client/main.lua'
}

(If you dont have any file of this type, feel free to create one !)

does work but cannot lockpick vehicles.