Configuration
Every option in STG Sticky Notes config/config.lua, from the item and command to note size, the admin panel, notifications and exports.
All settings live in stg-stickynotes/config/config.lua. The file stays editable in the escrow version. Restart the resource after a change.
Language
Config.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, fi, ar, he, jp, zh. To change a text, edit the matching file in stg-stickynotes/locales/. A missing text falls back to English.
Target system
Config.TargetSystem = 'auto'Which target resource adds the Read Note and Delete Note options to placed notes.
| Value | Meaning |
|---|---|
'auto' | Uses ox_target when it is started, otherwise qb-target. |
'ox-target' | Always uses ox_target. |
'qb-target' | Always uses qb-target. ox_target still has to be running, because the resource lists it as a dependency. |
Item
Config.Item = 'stickynote'Name of the inventory item that opens the note editor. Using the item opens the editor, and one item is removed for every note placed while Config.Command.itemNeed is true. Change it if you added the item under a different name.
Command
Config.Command = {
active = true,
name = 'stickynote',
itemNeed = true,
}Prop
Type
Note size
Config.NoteSize = {
min = 0.1,
default = 0.2,
max = 0.3,
}Prop
Type
While placing, the mouse wheel changes the size in steps of 0.1, between min and max. The note is placed on the surface the camera aims at, up to 8 metres away, and saved notes are drawn for players within 50 metres.
Admin panel
Config.AdminMenu = {
active = true,
command = 'stickypanel',
identifiers = {
'discord:...',
'license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
-- 'license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
-- 'discord:000000000000000000',
-- 'live:xxxxxxxxxxxxxxxx',
-- 'xbl:xxxxxxxxxxxxxxxx',
},
}Prop
Type
The panel lists every note saved in the database with its id, the start of its text, its color and font. Pick a note to Teleport to it or Delete it for everyone. Players who are not in the list get a no permission message. Notes on vehicles and peds are not saved, so they do not appear here.
The file ships with example entries in identifiers. Remove them and add your own staff identifiers before you go live.
Notifications
Config.Functions = {
["helpNotify"] = function(message, icon)
lib.showTextUI(message, {
position = "right-center",
icon = icon,
})
end,
["hideHelpNotify"] = function()
lib.hideTextUI()
end,
["notify"] = function(message, type)
lib.notify({
description = message,
type = type,
duration = 5000,
})
end,
}- helpNotify: shows the key hints while a note is being placed or read. Replace the body to use your own text UI.
- hideHelpNotify: hides the hint again. Change it together with
helpNotify. - notify: messages such as "Note placed!".
typeissuccess,errororinfo. Replace the body to use your own notification system.
Exports
Client side export for other resources, for example a phone app or a shop:
exports['stg-stickynotes']:openNote(itemNeed)Opens the note editor for the local player, the same as using the item.
- With no argument or
true, the item check fromConfig.Command.itemNeedapplies. - With
false, the player can write and place a note without the item, and none is removed.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.