Difference between revisions of "DXX"
From Multi Theft Auto: Wiki
Latest revision as of 15:05, 4 June 2018
OOP Syntax Help! I don't understand this!
- Note: Use a dot instead of a colon to access class methods
- Method: Dxx.on(...)
bool Dxx.on(string eventName, function callbackFunction)
- eventName: The name of the event you want to listen for. Possible values are:
- callbackFunction: The function that is called when this event occurs.
- responseData - A string containing the remote response or "ERROR" if there was a problem
- errno - A number containing the error number or zero if there was no error.
- arguments... - The arguments that were passed into fetchRemote
This function does not return anything
local win = Window(700, 400, 1000, 600, "cool window") local btn = Button(55, 55, 125, 30, "click me") btn.setParent(win) btn.on("click", function() btn.value = "clicked" end)