Dragon Heart Studios
  • Dragon Heart Studios Documentation
  • 🌉DHS-Bridge
  • ⚙️Compatibility
  • 📜Scripts
    • 🎣DHS-Fishing
      • Installation
      • Configuration
      • Integration
    • 🕑DHS-ZWatch
      • Installation
      • Configuration
    • 💰DHS-PettyCrime
      • Installation
      • Configuration
      • Integration
    • 🪓DHS-LumberJack
      • Installation
      • Configuration
      • Integration
    • 🏵️DHS-Peyote
      • Installation
    • 🚗DHS-Boosting
      • Installation
      • Configuration
      • Integration
    • 🦌DHS-Hunting
      • Installation
      • Configuration
      • Integration
    • 👮DHS-PrisonSim
      • Installation
      • Configuration
        • Clothing Config
        • Convoy Config
        • Door Lock Config
        • Entity Sets Config
        • Items Config
        • Jobs Config
        • Locations Config
        • Mugshot Config
        • Object Placer Config
        • Pathfinding Config
        • Peds Config
        • Prison Schedules Config
        • Props Config
        • Solitary Config
      • Integration
      • Exports and Commands
  • 🐝DHS-BrewsAndWines
    • Installation
    • Configuration
      • Beehive Config
      • Clothing Config
      • Delivery Config
      • Mead Config
      • Object Placer Config
      • Peds Config
      • Security Config
      • Wine Config
    • Integration
    • Mead and Wine Brewing
Powered by GitBook
On this page
  • Minigame
  • Dispatch Function
  • Notify System
  1. Scripts
  2. DHS-Fishing

Integration

This is an entire page on what you can integrate with

WARNING: ONLY MESS WITH THESE IF YOU KNOW WHAT YOU ARE DOING!!!!

Minigame

By default we use ps-ui for the fishing minigame however, in the DHS-Fishing/client/editablefunctions.lua you can edit this to match whatever minigame you want.

function TriggerFishingMinigame()
    local player = Framework.Player
    local passed = false
    exports['ps-ui']:Circle(function(success)
            if success then
                passed = true
            else
                passed = false
            end
        end, Config.DifficultySettings[player.Metadata.fishinglvl].MinigameCircleNum,
        Config.DifficultySettings[player.Metadata.fishinglvl].MinigameCircleMS) -- NumberOfCircles, MS
    return passed
end

Dispatch Function

By default we use qbcore built in system however we have support for both:

  • ps-dispatch

  • cd-dispatch

however if you know what you are doing you can implement your own as well.

  • DHS-Fishing/client/editablefunctions.lua

```lua
function CallPolice()
    if Config.DispatchSystem == "qbcore" then
        TriggerServerEvent('police:server:policeAlert', Lang:t("police_alert.illegal_activity"))
    elseif Config.DispatchSystem == "ps-dispatch" then
        --exports['ps-dispatch']:SuspiciousActivity()
    elseif Config.DispatchSystem == "cd-dispatch" then
        -- local data = exports['cd_dispatch']:GetPlayerInfo()
        -- TriggerServerEvent('cd_dispatch:AddNotification', {
        --     job_table = {'police'}, 
        --     coords = data.coords,
        --     title = '10-15 - Illegal Fishing Activity',
        --     message = 'A '..data.sex..' using illegal bait at '..data.street, 
        --     flash = 0,
        --     unique_id = tostring(math.random(0000000,9999999)),
        --     blip = {
        --         sprite = 431, 
        --         scale = 1.2, 
        --         colour = 3,
        --         flashes = false, 
        --         text = '911 - Illegal Fishing Activity',
        --         time = (5*60*1000),
        --         sound = 1,
        --     }
        -- })
    else
        -- YOUR SYSTEM HERE
    end
end
```

Notify System

By default we use the built in qbcore notify system however we also support ox_lib notify but if you know what you are doing you can integrate this as well.

  • DHS-Fishing/client/editablefunctions.lua

```lua
function Notify(text, type, time)
    if Config.HandleNotify then
        Framework.Notify(text, type, time)
    else
        --Your Own Notify System
    end
end
```

PreviousConfigurationNextDHS-ZWatch

Last updated 1 year ago

📜
🎣