Full View config.lua

Config = {}


-- If you want to open for the player Guide Book on start game (when player registered character) 
-- Client Trigger: TriggerEvent("vms_guidebook:openGuideBook", "Book_ID")
-- Export: exports['vms_guidebook']:openBook("Book_ID")
-- Whats the Book_ID -> pages.js :2, :57 (thats id of books)


-- β–ˆβ–€ β–ˆβ–€β–„ β–„β–€β–„ β–ˆβ–„ β–„β–ˆ β–ˆβ–ˆβ–€ β–ˆ   β–ˆ β–„β–€β–„ β–ˆβ–€β–„ β–ˆβ–„β–€
-- β–ˆβ–€ β–ˆβ–€β–„ β–ˆβ–€β–ˆ β–ˆ β–€ β–ˆ β–ˆβ–„β–„ β–€β–„β–€β–„β–€ β–€β–„β–€ β–ˆβ–€β–„ β–ˆ β–ˆ
Config.Core = "ESX" -- "ESX" / "QB-Core"
Config.CoreExport = function()
    return exports['es_extended']:getSharedObject()
    -- return exports['qb-core']:GetCoreObject()
end

Config.Interact = {
    Enabled = false,
    Open = function(message)
        exports["interact"]:Open("E", message) -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
        -- exports['qb-core']:DrawText(message, 'right')
    end,
    Close = function()
        exports["interact"]:Close() -- Here you can use your TextUI or use my free one - https://github.com/vames-dev/interact
        -- exports['qb-core']:HideText()
    end,
}


-- β–€β–ˆβ–€ β–ˆβ–€β–„ β–„β–€β–„ β–ˆβ–„ β–ˆ β–„β–€β–€ β–ˆ   β–„β–€β–„ β–€β–ˆβ–€ β–ˆβ–ˆβ–€
--  β–ˆ  β–ˆβ–€β–„ β–ˆβ–€β–ˆ β–ˆ β–€β–ˆ β–„β–ˆβ–ˆ β–ˆβ–„β–„ β–ˆβ–€β–ˆ  β–ˆ  β–ˆβ–„β–„
Config.Translate = {
    ['open_menu'] = "Press ~INPUT_CONTEXT~ to open the %s",
    ['admincmd.help'] = 'Open Book For Player',
    ['admincmd.arg_player'] = 'Here Enter Player ID',
    ['admincmd.arg_bookid'] = 'Here Enter Book ID',
}


-- β–ˆβ–„ β–„β–ˆ β–„β–€β–„ β–ˆ β–ˆβ–„ β–ˆ   β–„β–€β–€ β–ˆβ–ˆβ–€ β–€β–ˆβ–€ β–€β–ˆβ–€ β–ˆ β–ˆβ–„ β–ˆ β–„β–€  β–„β–€β–€
-- β–ˆ β–€ β–ˆ β–ˆβ–€β–ˆ β–ˆ β–ˆ β–€β–ˆ   β–„β–ˆβ–ˆ β–ˆβ–„β–„  β–ˆ   β–ˆ  β–ˆ β–ˆ β–€β–ˆ β–€β–„β–ˆ β–„β–ˆβ–ˆ
Config.DefaultGuideBookId = 'default' -- pages.js :2 (thats id of book)

Config.Command = 'guidebook' -- if you dont want access to book with command set it ''
Config.CommandDescription = 'Guide Book'
Config.OpenKey = 'J' -- if you dont want access to book with key bind set it ''


Config.AdminOpenBookCommand = 'openbook' -- if you dont want admins access to open book for player set it ''
Config.AdminOpenBookRank = 'admin'

Config.UseSoundsUI = true -- Do you want to use page turning sounds?
Config.EnableBlur = true -- Do you want to blur the background in the game when you have book opened?


Config.Actions = { -- Here you adding the clickable functions in the book
    [1] = function() -- Here ID 1 == in JS useAction(1)
        SetEntityCoords(PlayerPedId(), vector3(414.3, -978.43, 28.45))
        SetEntityHeading(PlayerPedId(), 266.26)
        closeBook()
    end,
}

Config.AccessOnMarker = true -- Do you want to use access to the books as E in marker?

Config.BooksPositions = { -- it works if you have Config.AccessOnMarker = true
    {
        bookId = 'default',
        name = 'Guide Book',
        coords = vector3(-262.35, -976.97, 31.22),
        marker = {
            id = 2, -- https://docs.fivem.net/docs/game-references/markers/
            color = {101, 185, 231, 120}, -- R(ed), G(reen), B(lue), A(lpha)
            scale = vec(0.25, 0.25, 0.25),
            bobUpAndDown = true, -- jumping marker
            rotate = true -- rotating marker
        },
        blip = { -- https://docs.fivem.net/docs/game-references/blips/
            enabled = true,
            sprite = 525,
            display = 4,
            scale = 0.8,
            color = 67,
            name = "Guide Book"
        }
    },
    {
        bookId = 'police',
        name = 'Police Book',
        coords = vector3(441.03, -981.11, 30.69),
        marker = {
            id = 2, -- https://docs.fivem.net/docs/game-references/markers/
            color = {101, 185, 231, 120}, -- R(ed), G(reen), B(lue), A(lpha)
            scale = vec(0.25, 0.25, 0.25),
            bobUpAndDown = true, -- jumping marker
            rotate = true -- rotating marker
        },
        blip = { -- https://docs.fivem.net/docs/game-references/blips/
            enabled = false,
            sprite = 525,
            display = 4,
            scale = 0.8,
            color = 67,
            name = "Police Book"
        }
    },
}

Last updated