Difference between revisions of "DgsG2DLoadHooker"

From Multi Theft Auto: Wiki
Line 3: Line 3:
 
This function allows developers to load [[G2D]] hooker in script.
 
This function allows developers to load [[G2D]] hooker in script.
 
<div style="background:#C0D0FF;border-radius:5px;padding:5px;">
 
<div style="background:#C0D0FF;border-radius:5px;padding:5px;">
'''Note:''' <br>
+
'''Notice:''' <br>
1.[[dgsImportFunction]] is required before using [[dgsG2DLoadHooker]]<br>
+
<div style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;1.[[dgsImportFunction]] is required before using [[dgsG2DLoadHooker]]</div>
2.[[dgsG2DLoadHooker]] should be executed before gui creation!
+
<div style="color:#000000;">&nbsp;&nbsp;&nbsp;&nbsp;2.[[dgsG2DLoadHooker]] should be executed before gui creation!</div>
 
</div>
 
</div>
 
==Syntax==  
 
==Syntax==  

Revision as of 15:52, 1 October 2019

This function allows developers to load G2D hooker in script.

Notice:

    1.dgsImportFunction is required before using dgsG2DLoadHooker
    2.dgsG2DLoadHooker should be executed before gui creation!

Syntax

string dgsG2DLoadHooker( )

Required Arguments

None

Returns

Returns a string which can be loaded by loadstring, false otherwise.

Example

loadstring(exports.dgs:dgsImportFunction())() --Import functions before
loadstring(exports.dgs:dgsG2DLoadHooker())()  --Load G2D Hooker
local buttonElement = guiCreateButton(200,200,300,300,"Test",false)  --Though you are using gui functions and events, but they have already hooked by DGS
addEventHandler ( "onClientGUIClick", buttonElement, function()
	outputChatBox("clicked")
end, false )

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D