MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  • MSK.TextUI.Show
  • MSK.TextUI.ShowThread
  • MSK.TextUI.Hide
  • MSK.TextUI.Active
  1. Scripts
  2. MSK Core
  3. Functions
  4. Client
  5. UI

TextUI

Last updated 6 months ago

Preview

MSK.TextUI.Show

Show the TextUI

Parameters key - string - The key that needs to be pressed text - string - Text color - string - Color as hex - Optional, default: '#5eb131'

MSK.TextUI.Show(key, text, color)

-- Example 1: default color
MSK.TextUI.Show('E', 'Press ~g~E~s~ to interact')

-- Example 2: specific color
MSK.TextUI.Show('E', 'Press ~g~E~s~ to interact', '#5eb131')

-- As an Export:
exports.msk_core:ShowTextUI(key, text, color)

MSK.TextUI.ShowThread

Show the TextUI in a thread

Parameters key - string - The key that needs to be pressed text - string - Text color - string - Color as hex - Optional, default: '#5eb131'

MSK.TextUI.ShowThread(key, text, color)

-- Example
CreateThread(function()
    while true do 
        local sleep = 250
        local distance = #(MSK.Player.coords - vector3(572.04, 2724.34, 42.05))

        if distance <= 2.5 then
            sleep = 0
            MSK.TextUI.ShowThread('E', 'Press ~g~E~s~ to interact')
        end

        Wait(sleep)
    end
end)

-- As an Export:
exports.msk_core:ShowTextUIThread(key, text, color)

MSK.TextUI.Hide

Hide the TextUI

MSK.TextUI.Hide()

-- As an Export:
exports.msk_core:HideTextUI()

MSK.TextUI.Active

Check if the TextUI is active

Returns isActive - boolean - whether the TextUI is active

local isActive = MSK.TextUI.Active()

-- As an Export:
local isActive = exports.msk_core:TextUIActive()