Skip to content

Conversation

@Bushcowboy
Copy link
Contributor

As described on Discord: https://discord.com/channels/611781170895781888/1392992430466404402/1392992430466404402

Features

  • Added config option to auto-hide the mini-CAD when a player exits a vehicle and automatically restore it when they re-enter

  • Added new config options to restrict CAD access unless one of the following conditions is met:

    • QB & ESX: Player possesses a specific item (e.g., a tablet) in their inventory
    • QB & ESX: Character belongs to the appropriate job/faction—units will only display if relevant
    • QB & ESX: Character holds a permitted job (CAD access based on job)
    • Player is inside a whitelisted emergency vehicle

Testing

  • Light testing performed; new config options are working as expected
  • No UI-specific issues observed—any attach/detach or refresh-related delays appear to stem from backend behavior

As described on Discord: [https://discord.com/channels/611781170895781888/1392992430466404402/1392992430466404402](https://discord.com/channels/611781170895781888/1392992430466404402/1392992430466404402)

### Features

* Added config option to **auto-hide the mini-CAD** when a player exits a vehicle and automatically restore it when they re-enter
* Added new config options to **restrict CAD access** unless one of the following conditions is met:

  * **QB & ESX**: Player possesses a specific item (e.g., a tablet) in their inventory
  * **QB & ESX**: Character belongs to the appropriate job/faction—units will only display if relevant
  * **QB & ESX**: Character holds a permitted job (CAD access based on job)
  * Player is inside a **whitelisted emergency vehicle**

### Testing

* Light testing performed; new config options are working as expected
* No UI-specific issues observed—any attach/detach or refresh-related delays appear to stem from backend behavior
@Fireant456 Fireant456 self-requested a review July 24, 2025 20:45
feat(vehreg): Add Make and Year support, fix customData nil bug
…FiveM; branch 'master' of github.com:Sonoran-Software/SonoranCADFiveM into feat-functionality
Copy link
Contributor

@Fireant456 Fireant456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR first off! We appreciate your continued contributions to this project.

I have identified some items we have not explicitly laid out in the original bounty but are considerations for user experience. We would like to move the configuration file items you have made from tablet/config.lua to sonorancad/configuration/tablet_config.dist.lua. This will require utilizing your new export for getting that configuration settings from the core resource. We also identified that the default configuration doesn't fully mimic the default behavior of the existing tablet resource. We want you to revise those settings to match the current behavior out of the box. Basically with all the new configurations in the disabled state.

QA Round 1:

  • Move tablet/config.lua to sonorancad/configuration/tablet_config.dist.lua and handle passing configuration through exports.
  • Revise default configuration to match current "default" behavior.

@Bushcowboy Bushcowboy requested a review from Fireant456 July 31, 2025 05:00
fixed something i forgot to update in the new config method
@Fireant456
Copy link
Contributor

Sorry for the delay in getting this run through QA again, we notice some minor issues right off the bat that will need to be corrected.

  • Print statements should be changed to debugprint function calls so that they only print when in the respective debug mode. I believe this is already exported via the main CAD resource but may also be exported if it has not already been.
  • Functionality: Job check seems not to function at all when enabled.
  • Functionality: Minicad options seem not to work (autohide and only allow in vehicle)
  • Add "police" to default allowed jobs
  • Rename default config file from tablet_config.lua to tablet_config.dist.lua to ensure updates do not overwrite user configurations.
  • In relation to the last point we may need to manually specify this config file in the updater code to rename this file since it doesn't have all the aspects of a normal submodule. If you can handle this, great, if not please let us know and we can make those necessary changes.

Copy link
Contributor

@Fireant456 Fireant456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants