[Release] Advanced Vehicle Interaction

Absolutely no problem :slight_smile:
You can only learn from mistakes :smiley:

What you are referring to as “ms” is the time in milliseconds the script takes per frame.
So yes, generally you want to stay as low as possible to provide the best user experience (and the highest amount of fps (frames per second)).

But it is never a problem to go higher if it is just for a certain action (like this open menu). As long as you are not actively using the menu, it takes basically nothing. Just when it is open, there are a lot of DrawCalls being made (and those are the main caviat as to why it takes so much ms).

e.g. any script that has a “Help Message” (the ones in the top left corner) will usually draw 0.01ms more than it would without the message. And that is just one message.
A single ContextMenu menu with a single option already has 6 DrawCalls and for every other option it is at least two more DrawCalls (depending on the menu item type).

If you would use a NUI (e.g. html/css/js), that will reduce the “ms” that is being shown by a lot. But that does not mean, that it is actually taking less resources. They are just being shifted to the FiveM “browser overlay”, which as far as I know, does not show up in the resource monitor.

1 Like

Small update with performance improvements and compatibility fixes.

Have a question with this if I wanted to use this feature but have only mechanics with the grade of boss be able to use it would this be possible?

1 Like

It is not an option. But I try to keep my scripts as clean as possible so it is easy to build things like that into it yourself.

Apart from that every single option can be turned off as well. If you want to remove it from the menu and just use your mechanics script.

Thank you for the answer it helps!

1 Like

Small fix. The bug didn’t actually break anything. I just wanted it crossed off the list.

Fixed a small error when not also using my script “VehicleKeyChain”

For some reason I cannot edit the original post, so here you go:

New update fixing two issues!

Update (v1.3.4):

  • Fixed vehicle being repaired when an extra was toggled.
  • Fixed vehicle “flipping” when interacting while entering.

Small update actually fixing the vehicle being repaired.
(it still is repaired visually, but engine, tank etc. stay broken)

This script now uses the Asset Escrow System, meaning you can download it from your keymaster website!
There is currently no encryption being used at all!

Minor update adding a config option, so only Vehicle owner can toggle the engine.

Update v1.5

  • Updated to new ContextMenu version 2.0. You need to completely remove the old ContextMenu and replace it with the new one.

Update v1.6.0

  • Added support for QBCore.
  • Added admin option for repairing a vehicle and flipping it right side up
  • Added a small amount of encryption. (~200 lines)
  • Added the door lock code from VehicleKeyChain (lights now have a blinking pattern).
  • Reworked some parts of the code to make it more readable and performant. Most notably:
    • Separated a lot of functions into smaller functions.
    • Switched from entity enumeration to GetGamePool function for getting vehicles on client side.
  • Fixed a missing string in the config.
  • “Fixed” the “keepEngineOff” setting. GTA added a new function. Not a fix, actually a new function now.

Hotfix v1.6.1

  • Fixed error when locking vehicle.

Hotfix v1.6.2

  • Fixed an error when trying to flip a vehicle.
1 Like

Update v1.7.0

  • Added compatibility for the v3.x releases of AdvancedParking for the "Delete" and "Restore" function.