Adding your exports

Adding your exports

This guide details how to use and configure external scripts using the lc_utils resource in your server. It provides an approach to integrating various pre-configured and custom scripts, making easier to use different scripts such as fuel systems, inventory management, vehicle keys, and more.

⚠️

We do not own any of the scripts listed below. Support for these scripts is limited, and integration has been done by our user community.

Pre-configured script exports

Our script comes with many pre-configured exports to simplify your workflow. Below is the configuration to view and toggle the available options for each type of export.

Config.custom_scripts_compatibility = {
	['fuel'] = "default",						-- [ox_fuel|ps-fuel|sna-fuel|cdn-fuel|LegacyFuel|default|other] Fuel script Compatibility
	['inventory'] = "default",					-- [ox_inventory|qs-inventory|ps-inventory|default|other] Inventory script Compatibility
	['keys'] = "default",						-- [qs-vehiclekeys|cd_garage|jaksam|wasabi_carlock|default|other] Keys script Compatibility
	['mdt'] = "default",						-- [ps-mdt|redutzu-mdt|default|other] MDT script Compatibility (to log weapon serial)
	['target'] = "disabled",					-- [qb-target|ox_target|disabled|other] Target script Compatibility (disabled will use markers)
	['notification'] = "default",				-- [okokNotify|qbcore|default|other] Notification script Compatibility
}

Available exports list

Use the tabs below to learn more about the configuration options available for each script category:

For fuel, we have these options:

  • ox_fuel
  • ps-fuel
  • sna-fuel
  • cdn-fuel
  • LegacyFuel

Configuring new exports

To integrate a script not pre-configured, you can set its corresponding field to "other" and after that add your custom export in the respective file, as in the next steps:

Config.custom_scripts_compatibility = {
    ['fuel'] = "other",  -- Set to 'other' to use a custom script
    ...
}

Configuration examples

Below are working examples for each type of resource. Use a similar approach for the scripts you want to configure.

⚠️

The examples below are for clarification purposes only. When using other exports, refer to the documentation of the script you're trying to implement.

Navigate to lc_utils\custom_scripts\client\fuel.lua. Below there is a working example using LegacyFuel exports:

function Utils.CustomScripts.setVehicleFuel(vehicle, plate, model, fuel)
	exports['LegacyFuel']:SetFuel(vehicle, fuel)
end

Contributing

  • If you have successfully implemented any code, please share your results on our Discord to assist other customers using the same scripts.
  • Claim your customer role in the customer dashboard then you'll unlock the snippets channel where you can post your results.
  • Join us on Discord: https://discord.gg/U5YDgbh (opens in a new tab)