Skip to content

[NEW FEATURE] DrawText in core #527

@IdrisDose

Description

@IdrisDose

I've added the drawtext feature from qb-drawtext.

qb-drawtext

A NUI DrawText with a few different config options. Please make sure you handle the showing and hiding as if done incorrectly it will just repeatadly send nui messages.

How to use

This can be triggered from the server or client. A more advanced example is posted below.

Function or Event Description
exports['qb-core']:DrawText('message','position') This is a client export that will draw a message at the specified position (listed below)
exports['qb-core']:ChangeText('message','position') This is a client export that will change the currently displayed message at the specified position (listed below)
exports['qb-core']:HideText() This will hide the text display
exports['qb-core']:KeyPressed() This is useful if you want to change the background and hide the text on keypress (if not handled correctly users will have to renter the zone to display)
TriggerClientEvent('qb-core:client:DrawText', source, message, position) The same as the export but as an event
TriggerClientEvent('qb-core:client:ChangeText', source, message, position) The same as the export but as an event
TriggerClientEvent('qb-core:client:HideText', source) The same as the export but as an event
TriggerClientEvent('qb-core:client:KeyPressed', source) The same as the export but as an event

Positions accepted are:

  • left
  • right
  • top

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions