DestroyTextBox

From Onset Developer Wiki
DestroyTextBox

Type: Function
Context: Client
Introduced: v1.0

Description

Destroy a text box created with CreateTextBox.

Syntax

DestroyTextBox(textid)

Parameters

  • textid
    The text identifier.

Return Value

  • This function returns nothing.

Example

-- client side
CashText = 0

AddEvent("OnPackageStart", function()
	CashText = CreateTextBox(-15, 180, 'CASH', "right")
	SetTextBoxAnchors(CashText, 1.0, 0.0, 1.0, 0.0)
	SetTextBoxAlignment(CashText, 1.0, 0.0)
end)

AddEvent("OnPackageStop", function()
	DestroyTextBox(CashText)
end)

See also