# Script Integrations

## How to Change Notify

***

{% embed url="<https://www.youtube.com/embed/Ih3aTX2d9C0>" %}

<pre class="language-lua" data-title="0r-fishingv2/config/config.lua" data-line-numbers><code class="lang-lua">---@field string Notification system to use.
--- Determines which notification script will handle alerts and messages.
--- Supported: okokNotify, ps-ui, ox_lib, framework default
--- Use "auto" to automatically detect an available system.
--- Default: auto
<strong>Config.Notify = "auto"
</strong></code></pre>

{% hint style="info" %}
The following notify scripts are supported by default: **okokNotify, ps-ui, ox\_lib, framework default**
{% endhint %}

***

#### If you want to add an unsupported notify script, follow these steps

<pre class="language-lua" data-title="0r-fishingv2/modules/notify/cl-main.lua" data-line-numbers><code class="lang-lua">---Modules.Client.Notify.Send(message, type, time)
---@param message string
---@param type string
---@param time number
---@return nil
function Modules.Client.Notify.Send(message, type, time)
    type = type or "success"
    time = time or 5000

    if (Config.Notify == "auto" and GetResourceState("okokNotify") == "started") or Config.Notify == "okokNotify" then
        exports["okokNotify"]:Alert("Fishing", message, time, type)
<strong>    elseif (Config.Notify == "auto" and GetResourceState("your_notify_script_name") == "started") or Config.Notify == "your_notify_script_name" then
</strong><strong>        -- Add your export or event here. Example;
</strong><strong>        -- exports['no1-notify']:SendNotify({
</strong><strong>        --     title = "Fishing",
</strong><strong>        --     description = message,
</strong><strong>        --     type = type,
</strong><strong>        --     duration = 5000
</strong><strong>        -- })
</strong>    elseif (Config.Notify == "auto" and GetResourceState("ps-ui") == "started") or Config.Notify == "ps-ui" then
        exports["ps-ui"]:Notify(message, type, time)
    elseif (Config.Notify == "auto" and GetResourceState("ox_lib") == "started") or Config.Notify == "ox_lib" then
        exports["ox_lib"]:notify({
            title = "Fishing",
            description = message,
            type = type
        })
    else
        return Framework.Client.SendNotify(message, type, time)
    end
end

RegisterNetEvent("0r-fishingv2:client:send-notify", function(...)
    Modules.Client.Notify.Send(...)
end)
</code></pre>

## How to change Vehiclekey

***

{% embed url="<https://www.youtube.com/embed/6mDw-weXrp8>" %}

<pre class="language-lua" data-title="0r-fishingv2/config/config.lua" data-line-numbers><code class="lang-lua">---@field string Vehicle keys system to use.
--- Defines which script manages vehicle locking/unlocking and key ownership.
--- Supported: 0r-vehiclekeys, qb-vehiclekeys, qbx_vehiclekeys, jaksam-vehicles-keys, mk_vehiclekeys,
--- qs-vehiclekeys, wasabi_carlock, cd_garage, okokGarage, t1ger_keys, MrNewbVehicleKeys,
--- Renewed, tgiann-hotwire
--- Use "auto" to automatically detect an available system.
--- Default: auto
<strong>Config.VehicleKeys = "auto"
</strong></code></pre>

{% hint style="info" %}
The following vehiclekeys scripts are supported by default: **0r-vehiclekeys, qb-vehiclekeys, qbx\_vehiclekeys, jaksam-vehicles-keys, mk\_vehiclekeys,wasabi\_carlock, cd\_garage, okokGarage, t1ger\_keys, MrNewbVehicleKeys, Renewed, tgiann-hotwire**
{% endhint %}

***

#### If you want to add an unsupported vehiclekey script, follow these steps;

<pre class="language-lua"><code class="lang-lua"><strong>Config.VehicleKeys = "your_vehiclekeys_script_name"
</strong></code></pre>

<pre class="language-lua" data-title="0r-fishingv2/modules/vehiclekeys/cl-main.lua" data-line-numbers><code class="lang-lua">---Modules.Client.Vehiclekeys.Give(plate, vehicleEntity)
---@param plate string
---@param entities number
---@return nil
function Modules.Client.Vehiclekeys.Give(plate, entities)
    if not DoesEntityExist(entities) then return false end
    if not plate or plate == "" then
        error("No plate provided to give keys for vehicle.")
        return false
    end

    plate = plate:upper()

    if Config.VehicleKeys == "0r-vehiclekeys" then
        exports["0r-vehiclekeys"]:GiveKeys(plate)
    elseif Config.VehicleKeys == "qb-vehiclekeys" then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    elseif Config.VehicleKeys == "qbx_vehiclekeys" then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    elseif Config.VehicleKeys == "jaksam-vehicles-keys" then
        TriggerServerEvent("vehicles_keys:selfGiveVehicleKeys", plate)
    elseif Config.VehicleKeys == "mk_vehiclekeys" then
        exports["mk_vehiclekeys"]:AddKey(entities)
    elseif Config.VehicleKeys == "qs-vehiclekeys" then
        local model = GetDisplayNameFromVehicleModel(GetEntityModel(entities))
        exports["qs-vehiclekeys"]:GiveKeys(plate, model)
    elseif Config.VehicleKeys == "wasabi_carlock" then
        exports.wasabi_carlock:GiveKey(plate)
    elseif Config.VehicleKeys == "cd_garage" then
        TriggerEvent("cd_garage:AddKeys", plate)
    elseif Config.VehicleKeys == "okokGarage" then
        TriggerServerEvent("okokGarage:GiveKeys", plate)
    elseif Config.VehicleKeys == "t1ger_keys" then
        local vehicleName = GetDisplayNameFromVehicleModel(GetEntityModel(entities))
        exports["t1ger_keys"]:GiveJobKeys(plate, vehicleName, true)
    elseif Config.VehicleKeys == "MrNewbVehicleKeys" then
        exports.MrNewbVehicleKeys:GiveKeys(entities)
    elseif Config.VehicleKeys == "Renewed" then
        exports["Renewed-Vehiclekeys"]:addKey(plate)
    elseif Config.VehicleKeys == "tgiann-hotwire" then
        exports["tgiann-hotwire"]:CheckKeyInIgnitionWhenSpawn(entities, plate)
<strong>     elseif Config.VehicleKeys == "your_vehiclekeys_script_name" then
</strong><strong>        -- Add your add keys export or event here. Example;
</strong><strong>        -- exports["your_vehiclekeys_script_name"]:GiveKeys(plate)
</strong><strong>    else
</strong>        -- Setup custom key system here...
        error("No valid vehicle key system configured, please set Config.VehicleKeys to your key system or setup your own in the else statement.")
    end
end

---Modules.Client.Vehiclekeys.Remove(plate, vehicleEntity)
---@param plate string
---@param entities number
---@return nil
function Modules.Client.Vehiclekeys.Remove(plate, entities)
    if not DoesEntityExist(entities) then return false end
    if not plate or plate == "" then
        error("No plate provided to remove keys for vehicle.")
        return false
    end

    plate = plate:upper()

    if Config.VehicleKeys == "0r-vehiclekeys" then
        exports["0r-vehiclekeys"]:RemoveKeys(plate)
    elseif Config.VehicleKeys == "qs-vehiclekeys" then
        local model = GetDisplayNameFromVehicleModel(GetEntityModel(entities))
        exports["qs-vehiclekeys"]:RemoveKeys(plate, model)
    elseif Config.VehicleKeys == "wasabi_carlock" then
        exports.wasabi_carlock:RemoveKey(plate)
    elseif Config.VehicleKeys == "t1ger_keys" then
        TriggerServerEvent("t1ger_keys:updateOwnedKeys", plate, false)
    elseif Config.VehicleKeys == "MrNewbVehicleKeys" then
        exports.MrNewbVehicleKeys:RemoveKeys(entities)
    elseif Config.VehicleKeys == "Renewed" then
        exports["Renewed-Vehiclekeys"]:removeKey(plate)
<strong>    elseif Config.VehicleKeys == "your_vehiclekeys_script_name" then
</strong><strong>        -- Add your remove keys export or event here. Example;
</strong><strong>        -- exports["0r-your_vehiclekeys_script_name"]:RemoveKeys(plate)
</strong><strong>    else
</strong>        -- Setup custom key system here...
        error("No valid vehicle key system configured, please set Config.VehicleKeys to your key system or setup your own in the else statement.")
    end
end
</code></pre>

## How to change Fuel

***

{% hint style="info" %}
Youtube Video Soon
{% endhint %}

<pre class="language-lua" data-title="0r-fishingv2/config/config.lua" data-line-numbers><code class="lang-lua">---@field string Fuel system to use.
--- Defines which fuel script controls vehicle fuel consumption.
--- Supported: LegacyFuel, ps-fuel, lj-fuel, cdn-fuel, hyon_gas_station, okokGasStation,
--- nd_fuel, myFuel, Renewed-Fuel, ox_fuel, rcore_fuel
--- Use "auto" to automatically detect an available system.
--- Default: auto
<strong>Config.Fuel = "auto"
</strong></code></pre>

{% hint style="info" %}
The following fuel scripts are supported by default: **LegacyFuel, ps-fuel, lj-fuel, cdn-fuel, hyon\_gas\_station, okokGasStation, nd\_fuel, myFuel, Renewed-Fuel, ox\_fuel, rcore\_fuel**
{% endhint %}

***

#### If you want to add an unsupported fuel script, follow these steps;

<pre class="language-lua"><code class="lang-lua"><strong>Config.Fuel = "your_fuel_script_name"
</strong></code></pre>

<pre class="language-lua" data-title="0r-fishingv2/modules/fuel/cl-main.lua" data-line-numbers><code class="lang-lua">---Modules.Client.Fuel.Set(vehicle, fuel)
---@param vehicle number
---@param fuel number
---@return nil
function Modules.Client.Fuel.Set(vehicle, fuel)
    if not DoesEntityExist(vehicle) then return false end

    if (Config.Fuel == "LegacyFuel" or Config.Fuel == "ps-fuel" or Config.Fuel == "lj-fuel" or Config.Fuel == "cdn-fuel" or Config.Fuel == "hyon_gas_station" or Config.Fuel == "okokGasStation" or Config.Fuel == "nd_fuel" or Config.Fuel == "myFuel" or Config.Fuel == "Renewed-Fuel") then
        exports[Config.Fuel]:SetFuel(vehicle, fuel)
    elseif Config.Fuel == "ox_fuel" then
        Entity(vehicle).state.fuel = fuel
    elseif Config.Fuel == "rcore_fuel" then
        exports.rcore_fuel:SetVehicleFuel(vehicle, fuel)
<strong>    elseif Config.Fuel == "your_fuel_script_name" then
</strong><strong>        -- Add your export or event here. Example;
</strong><strong>        -- exports['your_fuel_script_name']:SetFuel(vehicle, fuel)
</strong><strong>    else
</strong>        error("No valid fuel system configured, please set Config.Fuel to your fuel system or setup your own in the else statement.")
    end
end

</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/0r-resources/0r-fishing-v2/script-integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
