sh-k9

Just another K9 script with more features.

Installation

  1. Install dependencies:

  2. Put script into your resources, doesn't matter where...

  3. Make sure that script is starting after:

    • your database handler (if you using one, oxmysql/mysql-async)

    • your framework (if you using one, qb, esx etc.)

    • ox_lib

    • MenuV, only if you planning to use it

  4. Customise config file to your liking.

    • Read whole configuration, so you know what settings are available, before asking questions.

  5. Restart Server

How to setup advanced searching (Only for QB/QBX)

If you using qb-inventory (or reworked qb-inventory like lj, ps etc..) and you want to be able to search all vehicles then you will need to apply this code.

If you using different inventory than QB, OX or QS then you need to implement your own code into sh-k9/server/server_editable.lua

Inventory Code
inventory/server/main.lua
exports("GetTrunkItems", function(plate)
    if Trunks[plate] then
        return Trunks[plate].items
    end 
    return nil
end)

exports("GetGloveboxItems", function(plate)
    if Gloveboxes[plate] then
        return Gloveboxes[plate].items
    end 
    return nil
end) 

Last updated