[Release] Vehicle Door Controls

License GNU-GPL v3 Latest release Total downloads

Hi there!

I’m back with another release. This time it’s a rather simple one, only featuring basic key controls over nearest vehicle’s doors from the outside. It will be, however, worked on.

Preview

Features

  • open / close vehicle doors easily from the outside
  • roll windows up / down from the outside, when the door is open
  • blacklist any undesirable vehicles from the script
  • enable / disable the script at any time individually
     
Screenshots

Image 2

Instalation

  1. Extract the contents into folder called doorcontrol into your resources folder.
  2. Start the script: a) in the server.cfg file; b) through the console

Starting a resource through console

  1. In a server console, or client console (F8), type in refresh and confirm using ENTER
  2. Type in start doorcontrol and confirm using ENTER

Starting a resource in server.cfg

  1. Add this line to your server.cfg
start doorcontrol
  1. Save the file and restart the server.

Usage & Commands

/doorcontrol (alias /dc) - Enables or disables the door controls. This option is stored and persists upon reconnection / restart.

Note: The controls are disabled by default.

Known bugs

None! Feel free to open issue if you find any!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GNU GPL 3.0

Links

Latest release (download)
GitHub


Like the script? Don’t forget to :heart:

11 Likes

Amazing resource!

Also, I have only just put this in my server minutes ago. Does each player have to do /doorcontrol (/dc)
Or is it the server that has to?

1 Like

Glad you like it!

Every player who wants to use this has to use /dc once (then it gets stored into his local storage). You could definitely modify the script so it would be opt-out. I only made it opt-in because it can be a little resource hungry (as there is a reasonable amount of calculations made, and 3D text is rendered).

Ah ok,
sorry i dont understand much about code, how would i opt it out?

Also is there any possible way for the bum bin animation to play when the trunk opens?

I modified the script for you. Just download the latest code (not release).

I didn’t include animations because these would be very tricky with some vehicles.

ah ok appreciated!

anyway to make this so you don’t need to start in console as well?

What? Maybe read this: Introduction to resources.

useful!

1 Like

sorry im not a script creator and honestly just read that how does that have anything to do with my question no other scripts we use need to be started in the console only in server.cfg.

never mind i thought in your installation you were saying you had to start it both places not two different ways to start it.

For some reason, this script needed to be restarted before it would work when I tested it today. Simply starting it in the server.cfg doesn’t seem to work. I tested it myself because someone else I know installed it on their server and had the same issue. Tried it on one server with OneSync and one server without OneSync. Same issue, only worked after restarting the resource, itself.

Hi, please have a look in the console (client) for any errors. Which version are you using? I haven’t been able to reproduce this problem. Check your server configuration for any spelling errors which could cause the script not to start.

There are no console errors. The script “starts” because the command is visible as a preview when you start typing /doorcontrol. It just doesn’t actually seem to toggle on with that command or the /dc one until the script is restarted.

I’m using the latest release of the script. And server artifact version 3539

Thank you for the additional information. I’m still not able to reproduce the problem though. Please contact me using the contact on my GitHub profile, I’ll try to help you further without overflowing this thread with unnecessary conversation.

The script is only for our server until you spawn in a new ped or change your appearance from the original one you spawn in. any easy way to fix this issue

Update to version 1.2.0 in which this issue was addressed.

hey, how do i change the keybind for opening the doors?

Hi :wave:

You can change the keybind in your client’s settings under Key mapping > FiveM.

If you wish to change the default keybind, you’ll need to edit these lines:

and the 3D texts here: