Suggestion Questions About How Vehicles Are Saved and Restored

BacardiAdi

Supporter
The plugin sounds very interesting, exactly what I'm looking for. But I still have a few questions about it.

  • Does the vehicle get the same Net ID or does it get a new one?
  • Are there any hooks that can be used when parking/unparking?
  • What about other entities attached to the vehicle, such as the radio, additional storage, license plate?
  • Would it be possible to set it so that a vehicle can only be parked out of the same spot where it was parked?
  • Is it possible to save the SkinnID when refueling?
The plugin would be perfect for us to save Enites and thus improve performance. The only problem is the additional plugins we use, which is where the questions arose from :).
 
Does the vehicle get the same Net ID or does it get a new one?
It gets a new net id when spawned, but good point, I can look into saving and restoring the original (y)

Are there any hooks that can be used when parking/unparking?
I can add some api methods and hooks for that, let me know your exact use case so I can cover it properly

What about other entities attached to the vehicle, such as the radio, additional storage, license plate?
Child entities like code locks and turrets can be handled. For more specific stuff, I'd need to know exactly what plugin is attaching it so I can support it properly, but yeah, definitely doable and important for compatibility

Would it be possible to set it so that a vehicle can only be parked out of the same spot where it was parked?
I can add an option for that, no problem

Is it possible to save the SkinnID when refueling?
Can you clarify what you mean? Skin id of what, the fuel item itself or something else? Not sure I fully understood that part
 
For the last point, we use the plugin, and it has a SkinnID for different fuels:
https://codefling.com/clients/purchases/34477-heli-speed/

Unfortunately, we currently still use various plugins for the attached entities, including one we wrote ourselves.
For example
Storage on helicopter
Wooden panel with a number Panel with a picture at the top
https://umod.org/plugins/sirens
I can add some api methods and hooks for that, let me know your exact use case so I can cover it properly
I'll have to see if everything else works. That would be secondary. We have a key plugin based on Net ID.
 
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart