DestroyTextBox

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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