Origen Network Store
  • 👋Welcome to Origen Network Store
  • 🆘¿You need help?
  • ❓FAQS
  • 👮Origen Police
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • Pma-Voice
    • 📙Guide of Use
      • 💻Police CAD
        • Dispatch
        • Citizen Search
        • Reports
        • Vehicles
        • Criminal Code
        • Search and Capture
        • Debtors
        • Federal Management
        • Agent Management
        • Security Cameras
        • Radio
        • Time Control
        • Operations
      • 📄Interaction Menu
      • 📹Vehicle Radar
      • 🚔Sirens System
      • 🔦Evidence System
      • 🎛️Mini Dispatch
      • 🚁Helicopter Camera
      • 🪪Badges
      • ⛓️Federal System
      • 🔫Holster
      • 🐕K9 Dog
    • ❓Frequent Questions
    • ⚙️Configuration
      • Framework
      • Armoury
      • Commands
      • Confiscate
      • Evidences
      • Federal
      • Holster
      • K9
      • Licenses
      • Markers
      • Names
      • Outfits
      • Permissions
      • Props
      • Radio
      • Vehicles
    • #️⃣Exports
      • Client Exports
      • Server Exports
  • 📻Origen Radio
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • Pma-Voice
    • ⚙️Configuration
  • 🛠️Origen Admin
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
  • 🏎️Origen Races
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • #️⃣Exports
      • Client Exports
  • 🔫Origen Ilegal
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
      • qb-inventory
    • 💬Commands
    • ♻️Exports
  • 🏚️Origen Housing
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • ⚙️API
      • Exports
      • Hooks
      • Events
      • Scripts Support
        • 📱LB-Phone
  • 🚙Origen Parking
    • ⚠️Dependencies
    • 🔧Installation
      • QBCore SQL
      • ESX SQL
    • ⚙️Configuration
    • ♻️Exports
  • 💼origen_inventory
    • ⚠️Dependencies
    • 🔧Installation
      • SQL
    • ⛏️Scripts Support
      • 📱LB Phone
        • 2️From v2.1.14
      • 🏨QB Apartments
      • 🔫QB-Weapons
      • 🔨Jobs creator (Jaksam)
    • ♻️Exports
      • 🛥️Client Exports
      • ⚓Server
        • Hooks
    • How to
  • 🕵️‍♂️origen_hostage
    • 🔧Installation
  • 👷‍♂️Origen Masterjob
    • 🔧Installation
      • SQL
      • qb-inventory
      • qs-inventory
      • ox_inventory
    • ♻️Exports
  • QBCORE
    • 🍔origen_hud
      • ❔¿What is origen_hud?
      • 🔧Installations origen_hud
      • ❓FAQS origen_hud
    • 💬origen_notify
      • ❔¿What is origen_notify?
      • 🔧Installations origen_notify
      • ❓FAQS origen_notify
        • 🥬Snippets origen_notify
    • ⏸️origen_pausemenu
      • ❔¿What is origen_pausemenu?
      • 🔧Installations origen_pausemenu
      • ❓FAQS origen_pausemenu
      • 🔑EXPORTS origen_pausemenu
    • 🥷origen_blackmarket
      • ❔¿What is origen_blackmarket?
      • 🔧Installations origen_blackmarket
      • ❓FAQS origen_blackmarket
      • 🥬Snippets origen_blackmarket
    • 🧑‍🤝‍🧑origen_titlemenu
      • ❔¿What is origen_titlemenu?
      • 🔧Installations origen_titlemenu
      • ❓FAQS origen_titlemenu
      • 🥬Snippets origen_titles (soon)
    • 🚗origen_importheist
      • ❔¿What is origen_importheist?
      • 🔧Installations origen_importheist
      • ❓FAQS origen_importheist
      • 🥬Snippets origen_importheist (soon)
  • ESX
    • 🍔origen_hud
      • ❔¿What is origen_hud?
      • 🔧Installations origen_hud
      • ❓FAQS origen_hud
    • 💬origen_notify
      • ❔¿What is origen_notify?
      • 🔧Installations origen_notify
      • ❓FAQS origen_notify
      • 🥬Snippets origen_notify
    • ⏸️origen_pausemenu
      • ❔¿What is origen_pausemenu?
      • 🔧Installations origen_pausemenu
      • ❓FAQS origen_pausemenu
      • 🔑EXPORTS origen_pausemenu
    • 🧑‍🤝‍🧑origen_titlemenu
      • ❔¿What is origen_titlemenu?
      • 🔧Installations origen_titlemenu
      • ❓FAQS origen_titlemenu
      • 🥬Snippets origen_titles (soon)
    • 🚗origen_importheist
      • ❔¿What is origen_importheist?
      • 🔧Installations origen_importheist
      • ❓FAQS origen_importheist
      • 🥬Snippets origen_importheist (soon)
Powered by GitBook
On this page
  • Inventory modifications
  • Clothing modifications
  • Ambulance modifications
  • Setup CFG Permissions
  • Important
  1. Origen Police

Installation

Here we're going to guide you in the installation of origen_police.

PreviousDependenciesNextSQL

Last updated 5 months ago

First we want you to know that our script only supports the following versions of the two most used frameworks, in older versions it may be usable but we do not provide support since the development focuses on the following versions:

server.cfg
ensure oxmysql/icmysql
ensure qb-core
...(make sure to start the inventory before the script)

ensure pma-voice
ensure origen_police

Now you have to insert the SQL files into your database:

Put that items on shared of qb-core.

qb-core/shared/items.lua
['instant_camera'] = {['name'] = 'instant_camera', ['label'] = 'Instant camera', ['weight'] = 0, ['type'] = 'item', ['image'] = 'polaroid.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A simple camera designed to take photos at a crime scene'}, 
['photo'] = {['name'] = 'photo', ['label'] = 'Photo', ['weight'] = 0, ['type'] = 'item', ['image'] = 'photos.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'An image'},
['evidence_a'] = {["name"] = "evidence_a", ["label"] = "Evidence of bullet", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_a.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_az'] = {["name"] = "evidence_az", ["label"] = "Evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_az.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_b'] = {["name"] = "evidence_b", ["label"] = "Vehicle evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_b.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_n'] = {["name"] = "evidence_n", ["label"] = "Impact evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_n.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_ne'] = {["name"] = "evidence_ne", ["label"] = "Footprint evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_ne.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_r'] = {["name"] = "evidence_r", ["label"] = "Blood evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_r.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_ro'] = {["name"] = "evidence_ro", ["label"] = "Evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_ro.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['evidence_v'] = {["name"] = "evidence_v", ["label"] = "Drug evidence", ["weight"] = 0, ["type"] = "item", ["image"] = "evidence_v.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Evidence obtained from a crime scene"}, 
['report_evidence'] = {["name"] = "report_evidence", ["label"] = "Evidence report", ["weight"] = 0, ["type"] = "item", ["image"] = "report_evidence.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Here there can be collected up to 4 pieces of evidence"}, 
['k9'] = {["name"] = "k9", ["label"] = "K9 whistle", ["weight"] = 0, ["type"] = "item", ["image"] = "whistle.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Use the whistle to call the K9 unit"}, 
['lspd_badge'] = {["name"] = "lspd_badge", ["label"] = "Police badge", ["weight"] = 0, ["type"] = "item", ["image"] = "lspd_badge.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Your identification as a police officer, includes your rank and badge number"}, 
['bcsd_badge'] = {["name"] = "bcsd_badge", ["label"] = "Sheriff badge", ["weight"] = 0, ["type"] = "item", ["image"] = "bcsd_badge.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Your identification as a sheriff's agent, including your rank and badge number"}, 
['police_cad'] = {["name"] = "police_cad", ["label"] = "Police tablet", ["weight"] = 0, ["type"] = "item", ["image"] = "tablet.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Your personal tablet with all the information of the San Andreas police"}, 
['megaphone'] = {["name"] = "megaphone", ["label"] = "Megaphone", ["weight"] = 0, ["type"] = "item", ["image"] = "megaphone.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "A megaphone to make your voice heard"},
server.cfg
ensure oxmysql/icmysql
ensure es_extended
...(make sure to start the inventory before the script)

ensure pma-voice
ensure origen_police

Now you have to insert the SQL files into your database:

Place images from the origen_police/[assets]/inventory_images path into your inventory images directory.

Inventory modifications

If your inventory script don't appear here you don't have to modify anything inside it.

At the end of the file qb-inventory/server/main.lua

exports('GetStashItems', GetStashItems)

RegisterServerEvent('qb-inventory:server:SaveStashItems', function(stashId, items)
    MySQL.insert('INSERT INTO stashitems (stash, items) VALUES (@stash, @items) ON DUPLICATE KEY UPDATE items = @items', {
        ['@stash'] = stashId,
        ['@items'] = json.encode(items)
    })
    if Stashes[stashId] then
	Stashes[stashId].items = items
    end
end)

At the end of the file core_inventory/client/main.lua

exports("GetCurrentWeaponData", function()
    return currentWeaponData
end)

Clothing modifications

If your clothing script don't appear here you don't have to modify anything inside it.

At the end of the file qb-clothing/client/main.lua

exports("GetSkinData", function()
    return skinData
end)

Ambulance modifications

If your ambulance script don't appear here you don't have to modify anything inside it.

At the end of the file esx_ambulancejob/client/job.lua

RegisterCommand('revivep', function()
    local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
    revivePlayer(closestPlayer)
end)

RegisterCommand('healp', function()
    local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
    ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(quantity)
        if quantity > 0 then
            local closestPlayerPed = GetPlayerPed(closestPlayer)
            local health = GetEntityHealth(closestPlayerPed)
            if health > 0 then
                local playerPed = PlayerPedId()
                isBusy = true
                ESX.ShowNotification(_U('heal_inprogress'))
                TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
                Wait(10000)
                ClearPedTasks(playerPed)
                TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit')
                TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'big')
                ESX.ShowNotification(_U('heal_complete', GetPlayerName(closestPlayer)))
                isBusy = false
            else
                ESX.ShowNotification(_U('player_not_conscious'))
            end
        else
            ESX.ShowNotification(_U('not_enough_medikit'))
        end
    end, 'medikit')
end)

Setup CFG Permissions

Check that you have all these lines in your cfg, if you don't have any add them.

add_ace group.admin command allow
add_ace group.admin command.quit deny
add_ace resource.qb-core command allow
add_ace qbcore.god command allow
add_principal qbcore.god group.admin
add_principal qbcore.god qbcore.admin
add_principal qbcore.admin qbcore.mod

Now you will need to register your license as the qbcore.god group. To do this, you can use this example replacing your license.

add_principal identifier.license:8f1a3xxxxxxxxxxxxxxxx qbcore.god # Player Name

To check if you have correctly configured the permissions you should have the empty Config.Maps which is in config/markers.lua and the SETTINGS button should appear at the bottom right of the tablet.

Example of how the Config.Maps should be:

config/markers.lua
Config.Maps = { -- YOU CAN USE THIS OPTION OR THE IN GAME MENU INSIDE THE POLICE TABLET
    -- PLACE YOUR STATION NAME HERE, Example: "default-gta"
}

If you have the config/markers.lua correctly, you should get this message on F8 when starting the script for the first time:

WARNING: NO ACTIVE MAPS, PLEASE ADD SOME IN THE SETTING TAB OF THE POLICE TABLE

Screenshot of the location of the settings tab, if it's not showed check this guide again or ask in our discord server.

You will need to check that the permission group your character has is one of those listed in config/permissions.lua. Example of the default ones:

Config.PermissionsGroups = {
    "mod", "admin", "superadmin", "god" -- list of groups that will have all permissions, like "mod", "admin", "superadmin", etc
}

To check if you have a valid permission group you should have the empty Config.Maps which is in config/markers.lua and the SETTINGS button should appear at the bottom right of the tablet.

Example of how the Config.Maps should be:

config/markers.lua
Config.Maps = { -- YOU CAN USE THIS OPTION OR THE IN GAME MENU INSIDE THE POLICE TABLET
    -- PLACE YOUR STATION NAME HERE, Example: "default-gta"
}

If you have the config/markers.lua correctly, you should get this message on F8 when starting the script for the first time:

WARNING: NO ACTIVE MAPS, PLEASE ADD SOME IN THE SETTING TAB OF THE POLICE TABLE

Screenshot of the location of the settings tab, if it's not showed check this guide again or ask in our discord server.

Important

Remember to follow the pma-voice installation steps here:

👮
🔧
Pma-Voice
origen_police/[assets]/qb-core.sql
origen_police/[assets]/esx.sql