Help with lock/unlock script for police

I have a policejob which has got ability to spawn different cars from their garage (not owned by player or society) and with a setplate ‘POLICE’ I would like ONLY them to have access to unlocking/locking those vehicles by a button. Any help appreciated :slight_smile:

Edit: Oh, and I’m using ESX btw.

1 Like

An easy way would be to make a playerdata.job == ‘police’ check.
If the player is a police, he/she can open the doors of a specific model or plate number :slight_smile:

1 Like

I solved it i just made my own script

Well the reason i created this script is because i rewrote esx_police job 1.3.0 to have the 1.2.0 garage thats not linked to the database so i could also set multiple police cars to have the same PLATE ‘POLICE’. so i simply made that police have access to the lock and unlock feature designed just for them, every other feature can be used player wide besides the lock and unlocking we have another locking script that handles everyone else reads from the database and number plates.

1 Like

Good job bud!!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.