How to Change Notify#
https://www.youtube.com/embed/Ih3aTX2d9C0
---@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
Config.Notify = "auto"
The following notify scripts are supported by default: okokNotify, ps-ui, ox_lib, framework default
If you want to add an unsupported notify script, follow these steps#
---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)
elseif (Config.Notify == "auto" and GetResourceState("your_notify_script_name") == "started") or Config.Notify == "your_notify_script_name" then
-- Add your export or event here. Example;
-- exports['no1-notify']:SendNotify({
-- title = "Fishing",
-- description = message,
-- type = type,
-- duration = 5000
-- })
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)
How to change Vehiclekey#
https://www.youtube.com/embed/6mDw-weXrp8
---@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
Config.VehicleKeys = "auto"
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
If you want to add an unsupported vehiclekey script, follow these steps;#
Config.VehicleKeys = "your_vehiclekeys_script_name"
---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)
elseif Config.VehicleKeys == "your_vehiclekeys_script_name" then
-- Add your add keys export or event here. Example;
-- exports["your_vehiclekeys_script_name"]:GiveKeys(plate)
else
-- 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)
elseif Config.VehicleKeys == "your_vehiclekeys_script_name" then
-- Add your remove keys export or event here. Example;
-- exports["0r-your_vehiclekeys_script_name"]:RemoveKeys(plate)
else
-- 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
How to change Fuel#
Youtube Video Soon
---@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
Config.Fuel = "auto"
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
If you want to add an unsupported fuel script, follow these steps;#
Config.Fuel = "your_fuel_script_name"
---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)
elseif Config.Fuel == "your_fuel_script_name" then
-- Add your export or event here. Example;
-- exports['your_fuel_script_name']:SetFuel(vehicle, fuel)
else
error("No valid fuel system configured, please set Config.Fuel to your fuel system or setup your own in the else statement.")
end
end