Dynasty Store Documentation
DiscordOfficial WebsiteYouTube
  • ๐Ÿ Home
  • ๐Ÿ“ฆProducts
    • ๐Ÿ‘”Jobs
      • ๐Ÿ‘จโ€๐Ÿ”งDynasty Electrician
        • ๐Ÿ’พInstall Guide
        • ๐Ÿ“•User guide
        • โš™๏ธAdditional Configurations
        • ๐Ÿ› ๏ธCommon Issues
      • โ›๏ธDynasty Miner
        • ๐Ÿ’พInstall Guide
        • ๐Ÿ“•User guide
        • โš™๏ธAdditional Configurations
        • ๐Ÿ› ๏ธCommon Issues
      • ๐Ÿช™Dynasty Treasure Hunter
        • ๐Ÿ’พInstall Guide
        • ๐Ÿ“•User guide
        • โš™๏ธAdditional Configurations
        • ๐Ÿ› ๏ธCommon Issues
      • โ›‘๏ธDynasty Lifeguard
        • ๐Ÿ’พInstall guide
        • ๐Ÿ“•User guide
        • ๐Ÿ› ๏ธCommon issues
    • ๐Ÿ–Œ๏ธUI
      • ๐ŸŽฏDynasty Waypoint
        • ๐Ÿ’พInstall guide
        • ๐Ÿ“•User guide
        • ๐Ÿ› ๏ธCommon issues
      • ๐ŸŒ€Dynasty Text 3D
        • ๐Ÿ’พInstall guide
        • ๐Ÿ“•User guide
        • ๐Ÿ› ๏ธCommon issues
      • ๐Ÿ’ฌDynasty Notify
        • ๐Ÿ’พInstall Guide
        • ๐Ÿ“•User guide
        • ๐Ÿ› ๏ธCommon issues
      • ๐ŸงพDynasty Scoreboard
        • ๐Ÿ’พInstall Guide
        • ๐Ÿ“•User guide
        • ๐Ÿ› ๏ธCommon issues
    • ๐Ÿ”ซDynasty Mug & Carjack
      • ๐Ÿ’พInstall guide
      • ๐Ÿ“•User guide
      • ๐Ÿ› ๏ธCommon issues
Powered by GitBook
On this page
  • 1. Using the Text 3D
  • 2. Default Text 3D
  • 3. Text 3D configuration
  • 3.1 ID
  • 3.2 Coords
  • 3.3 Distance
  • 3.4 Marker distance
  • 3.5 Marker color
  • 3.6 Marker enable
  • 3.7 Key
  • 3.8 Key box color
  • 3.9 Key text color
  • 3.10 Message
  • 3.11 Message box color
  • 3.11 Message text color
  • 3.12 Text 3D enable
  • 4. Multiple Text 3D options
  • 1. Text 3D position
  • 5. Add functionality to the Text 3D
  • 5.1 Install Ox_Lib
  • 5.2 Add ox_lib to the script
  • 5.2 Add ox_lib to the script
  • 6. Remove Text 3D
  1. Products
  2. UI
  3. Dynasty Text 3D

User guide

User guide on how to use the Dynasty Text 3D

1. Using the Text 3D

DO NOT trigger this function on every tick; it is meant to be activated as a toggle.

You can use the text 3D as showed in the example bellow:

exports['dynasty_text3d']:Text3D({
        id = "Default text 3D ID",
        coords = vec3(0, 0, 0),
        distance = 3,
        markerDistance = 10.0,
        marker = true,
        key = "E",
        message = "Default Text 3D message",
})

2. Default Text 3D

In case you use a notification and don't fill any of the parameters, it will be filled with the value stated in the Config.file. For example if the parameter keyBoxColoris not used, it will be filled with the value 0,255,192,130 in this case.

Config.DefaultText3D = {
    id = "Default text 3D ID",
    coords = vec3(0, 0, 0),
    distance = 1.5,
    markerDistance = 3.0,
    markerColor = { 0, 255, 192, 255 },
    marker = true,
    key = "E",
    keyBoxColor = { 0, 255, 192, 130 },
    keyTextColor = { 255, 255, 255, 255 },
    message = "Default Text 3D message",
    messageBoxColor = { 0, 255, 192, 130 },
    messageTextColor = { 255, 255, 255, 255 },
    enabled = true,
}

3. Text 3D configuration

3.1 ID

id = "Default text 3D ID"

In this case the ID you use to call this Text 3D is Default text 3D ID

3.2 Coords

coords = vec3(0, 0, 0)

In this case the coords the Text 3D will appear are vec3(0, 0, 0)

3.3 Distance

distance = 1.5

In this case the distance from where you can see the Text 3D is 1.5

3.4 Marker distance

markerDistance = 3.0

In this case the distance from where you can see the marker is 3.0

3.5 Marker color

markerColor = { 0, 255, 192, 255 }

In this case the color of the marker is 0, 255, 192, 255

3.6 Marker enable

marker = true

In this case the marker enable is true

3.7 Key

key = "E"

In this case the key that appears is E

3.8 Key box color

keyBoxColor = { 0, 255, 192, 130 }

In this case the color of the key box is 0, 255, 192, 130

3.9 Key text color

keyTextColor = { 255, 255, 255, 255 }

In this case the color of the key text is 0, 255, 192, 130

3.10 Message

message = "Default Text 3D message"

In this case the message of the Text 3D is Default Text 3D message

3.11 Message box color

messageBoxColor = { 0, 255, 192, 130 }

In this case the message box color is 0, 255, 192, 130

3.11 Message text color

messageTextColor = { 255, 255, 255, 255 }

In this case the message text color is 0, 255, 192, 130

3.12 Text 3D enable

enabled = true

In this case the text 3D enable is true

4. Multiple Text 3D options

The example bellow shows how to use multiple options

exports['dynasty_text3d']:Text3D({
        id = "text-1",
        coords = vec3(0, 0, 0),
        distance = 3, -- distance to open the menu dialog
        markerDistance = 10.0, -- distance to show the marker
        marker = true, -- ACTIVATE THE MARKER ONLY FOR THE FIRST ELEMENT
        key = "E",
        message = "Buy equipment",
})
exports['dynasty_text3d']:Text3D({
        id = "text-2",
        coords = vec3(0, 0, 0),
        distance = 3, -- distance to open the menu dialog
        key = "F",
        message = "Sell equipment",
})
exports['dynasty_text3d']:Text3D({
        id = "text-3",
        coords = vec3(0, 0, 0),
        distance = 3, -- distance to open the menu dialog
        key = "G",
        message = "Deposit objects",
})

1. Text 3D position

Let's take the example above. If you have 3 options in the same position, you can also position them up or down depending on your need with the parameter position

exports['dynasty_text3d']:Text3D({       
        id = "text-2",
        coords = vec3(0, 0, 0),
        distance = 3, -- distance to open the menu dialog
        key = "F",
        message = "Sell equipment",
        position = { x = 0.0, y = 0.04 },
})

Approximately every 0.04 is the recommended size to position each box. If you have 3 for example, you can put nothing in the first, in the second in 0.04 and the last in 0.08 and if you want to make it go up, you can do it like this position = { x = 0.0, y = -0.04 }

5. Add functionality to the Text 3D

5.1 Install Ox_Lib

NOTE: It is important that the ox_lib script is started before starting our script.

5.2 Add ox_lib to the script

Go to fxmanifest.lua file inside your script and add the code below

shared_scripts {
      '@ox_lib/init.lua'
  }

5.2 Add ox_lib to the script

Add ox_lib pointer to your script as the example shown below

local mechanic1 = lib.points.new({
    coords = (0.0, 0.0, 0.0),  --- the coords of the place you want the interaction
    distance = 5,                         -- distance from the coord to work
    dunak = 'nerd',
})

local garage1Key = lib.addKeybind({
    name = 'mechanic',
    description = 'press E to open mechanic menu',
    defaultKey = 'E',
    onPressed = function(self)
        print("Here you put your function to open mechanic menu")
    end,
})

mechanic1Key:disable(true) -- disables the keybind

function garage1:onEnter()
    garage1Key:disable(false) -- enables the keybind
end

function garage1:onExit()
    garage1Key:disable(true) -- disables the keybind
end

Here is an example for a mechanic job where you get to 5 meters near the(0.0,0.0,0.0) coords and press the "E" key and prints "Here you put your function to open mechanic menu"

6. Remove Text 3D

We use the ID of the Text 3D to remove it like the example below

exports['dynasty_text3d']:DeleteText3D('DefaultText')

In this example the Text 3D with the ID DefaultText is removed

PreviousInstall guideNextCommon issues

Last updated 1 year ago

๐Ÿ“ฆ
๐Ÿ–Œ๏ธ
๐ŸŒ€
๐Ÿ“•
HTML Color CodesHTML Color Codes
Example of where you can get colors
Releases ยท overextended/ox_libGitHub
ox_lib Official Repository
Logo
Logo
If you have done everything right, you should see something similar to this.