HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • showTextUI
  • isTextUIOpen
  • hideTextUI
  • progressBar
  • createAlertDialogue
  • createInputDialogue
  • Notify
  1. Resources
  2. HRLib
  3. Modules
  4. Interface

Client

PreviousInterfaceNextServer

Last updated 1 month ago

showTextUI

Function to show HRLib's textUI

function HRLib.showTextUI(description: string)

Parameters description

  • description - the textUI content

Preview

isTextUIOpen

Function to get the status of the textUI with option to get the latest description

function HRLib.isTextUIOpen(returnLastDescription: boolean?):
boolean status,
string? textUIContent

Parameters description

  • returnLastDescription - sets whether or not the last description should be returned

Return description

  • status - contains the status of the textUI as boolean, for is it open or is it closed

  • textUIContent - the last content of the textUI (only available when returnLastDescription is true)

hideTextUI

Function to hide the textUI

function HRLib.hideTextUI()

progressBar

Function to set the progress bar with multiple options and three variants of progressBar

function HRLib.progressBar(
    type: 'circle'|'horizontal'|'vertical',
    options: {
        duration: number,
        description: string?,
        position: 'center-left'|'center'|'center-right'|'bottom-left'|
        'bottom-center'|'bottom-right'
    },
    await: boolean?,
    freezePlayer: boolean?,
    animation: {
        duration: number?,
        animName: string,
        animDict: string
    }
)

Parameters description

  • type - the progress bar type

  • options - the progress bar options

  • await - sets whether or not the code should wait the progressBar to finish

  • freezePlayer - sets whether or not the player is freezed during the progress bar

  • animation - sets whether or not the player should play an animation during the progress bar (if nil it won't start any animation)

Preview

createAlertDialogue

Function to create an alert dialogue

function HRLib.createAlertDialogue(
    options: {
        title: string,
        description: string?,
        onAgree: function?,
        onCancel: function?
    }
)

Parameters description

  • options - the dialogue's options

Preview

createInputDialogue

Function to create input dialogue

function HRLib.createInputDialogue(
    options: {
        title: string,
        questions: {
            type: 'text',
            options: HRLibInputDialogueTextOptions
        }[],
        onCancel: function?
    }
): string[]? result

Parameters description

  • options - the dialogue's options

Return description

  • result - contains the values from the inputed values

Preview

Notify

Function to send notification to a player with HRLib's notification system

function HRLib.Notify(-
    description: string,
    type: 'success'|'error'|'info'|'warning',
    duration: number?,
    pos: 'top-right'|'center-right'|'bottom-right'|'frombelow-right'|
    'top-left'|'left-center'|'frombelow-left'?,
    sound: boolean?
)

Parameters description

  • description - the notification's content

  • type - the notification type (default is 'info')

  • duration - the notification duration (default is 2500, in msec)

  • pos - the notification position on the screen (default is found in HRLib's config)

  • sound - sets whether or not the notification sound should be played (default is true)

Preview

Fields: duration - the animation duration (in msec, if nil, it will be -1) animName - the animation name animDict - the animation dictionary animFlag - the animation flag, see for eScriptedAnimFlags (list of flags)

📚
TaskPlayAnim