OnDgsDestroy: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client event}} __NOTOC__ This event is fired when the item of a dgs-dxgui element has been destroyed. ==Parameters== None ==Source== The event system#Event source|sour...")
 
No edit summary
Line 17: Line 17:
outputChatBox("A "..DGS:dgsGetType(source).." has been destroyed")
outputChatBox("A "..DGS:dgsGetType(source).." has been destroyed")
end
end
addEventHandler("onClientDgsDxGUIDestroy",getRootElement(),onDestroyed)
addEventHandler("onDgsDestroy",getRootElement(),onDestroyed)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 13:33, 20 January 2018

This event is fired when the item of a dgs-dxgui element has been destroyed.

Parameters

None

Source

The source of this event is the dgs-dxgui element that is destroyed.

Example

This example outputs a message when a dgs-dxgui element destroyed.

DGS = exports.dgs

function onDestroyed()
	outputChatBox("A "..DGS:dgsGetType(source).." has been destroyed")
end
addEventHandler("onDgsDestroy",getRootElement(),onDestroyed)


See Also

DGS events

General

Check Box

Combo Box

Drag'N Drop

Edit

Grid List

Menu

Selector

Mouse

Radio Button

Switch Button

Tab

Animation

Plugin

Media

Color Picker

QRCode

Remote Image

Client event functions