Search results

Jump to navigation Jump to search
  • author = getResourceInfo ( getThisResource(), "author" ) --Get the authors name if author then --if it exists
    1 KB (150 words) - 05:18, 11 August 2019
  • ...s your resource if any part of the code or some resource file has changed, it works just like "refreshResources ()" but adapted for one particular resour local meta = xmlLoadFile(":"..getResourceName(getThisResource()).."/meta.xml")
    2 KB (179 words) - 14:23, 23 January 2016
  • *'''quitMessage:''' A quit message to be displayed when quitting. By default it uses the quit message set by {{ml_birc|ircSetQuitMessage}}. This example creates an ircbot called ''DummyBot'' and makes it connect to irc.gtanet.com server on resource start. When the resource stops
    1 KB (148 words) - 18:23, 29 July 2009
  • resource getThisResource ( ) This example retrieves the current resource's root element and attaches it to an onResourceStart event handler. This causes the event handler to get c
    1 KB (157 words) - 19:40, 14 March 2023
  • ...it's quit message and makes it connect to a server. Once it has connected, it prints out the quit message to server log. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    1 KB (130 words) - 09:28, 30 July 2009
  • ...This function does not stop the resource immediately, so don't expect that it starts stopping until the [[onResourceStop]] event for that resource is tri -- if it's running, and it is not the current resource
    1 KB (160 words) - 04:47, 11 August 2019
  • ...lled ''DummyBot'' and makes it connect to a server. Once it has connected, it prints out a message with the bot's name to server log. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    991 bytes (120 words) - 09:23, 30 July 2009
  • Returns a ''string'' with the attribute value if it exists, ''false'' otherwise. author = getResourceInfo ( getThisResource(), "author" ) --Get the authors name
    1 KB (130 words) - 16:35, 1 January 2015
  • element getResourceRootElement ( [resource theResource=getThisResource()] ) ...not specified, assumes the current resource. (the resource returned from [[getThisResource]])
    2 KB (253 words) - 18:38, 17 December 2023
  • ...in a channel called ''#testchannel'' after it has connected. It also makes it part that channel after a little while. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    1 KB (176 words) - 18:23, 13 August 2009
  • This function returns the current channel topic and it's creator of the specified channel. The specified {{ml_birc|ircbot}} has to ...y set topic and it's creator of the specified channel. If no topic is set, it returns empty strings.
    2 KB (203 words) - 18:03, 13 August 2009
  • ...ng. This includes information about element types, and table structures. It is especially useful for quick debug tasks. If one of the arguments is nil, any arguments after it will not appear.
    4 KB (512 words) - 16:55, 18 February 2018
  • ...hich can used to check if the topic is locked (only channel ops can change it) on that channel. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    2 KB (218 words) - 17:58, 13 August 2009
  • ...es a little advert field on the bottom right corner of the screen and sets it to read only. if advert then -- if it was successfully created
    1 KB (163 words) - 10:57, 20 January 2018
  • ...ng="lua">addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), -- only execute the code when this resource restarts ...dOnly( memo, true ) -- make it read only, so players won't be able to edit it in-game
    1 KB (141 words) - 13:56, 10 August 2021
  • ...es a little advert field on the bottom right corner of the screen and sets it to read only. if advert then -- if it was successfully created
    1 KB (164 words) - 14:56, 18 January 2018
  • if advert then -- if it was successfully created DGS:dgsMemoSetReadOnly( advert, true ) -- make it read only
    1 KB (133 words) - 10:56, 20 January 2018
  • ...e default parent of all GUI elements that belong to a particular resource. It has a predefined variable called '''guiRoot''', and each resource has one o ...hlight lang="lua">element getResourceGUIElement ( [ resource theResource = getThisResource( ) ] )</syntaxhighlight>
    1 KB (183 words) - 21:12, 7 August 2018
  • if advert then -- if it was successfully created DGS:dgsEditSetReadOnly( advert, true ) -- make it read only
    1 KB (136 words) - 09:22, 15 July 2018
  • ...and makes it connect to a server and join a channel once it has connected. It also includes an IRC command '!setquitmessage <name>' which can be used to addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    1 KB (182 words) - 09:37, 30 July 2009
  • ...asa.com/mta/resources.php", handleVersionCheck, "version", getResourceName(getThisResource()) ) local thisVer = getResourceInfo(getThisResource(), "version")
    4 KB (489 words) - 09:25, 23 June 2016
  • ...es a little advert field on the bottom right corner of the screen and sets it to read only. if advert then -- if it was successfully created
    1 KB (176 words) - 20:57, 7 November 2018
  • ...nnel. The specified {{ml_birc|ircbot}} has to be in that channel and often it needs to have suitable privileges. ...urn ''true'' if the channel topic was successfully changed or ''false'' if it wasn't changed. You can check if the channel topic was changed by using cal
    2 KB (222 words) - 19:43, 14 August 2009
  • ...r ''false'' if the bot's name wasn't changed. You can check if the bot had it's name changed by using callback {{ml_birc|event_ircOnNickChange}}. ...and makes it connect to a server and join a channel once it has connected. It also includes an IRC command '!setname <name>' which can be used to change
    2 KB (211 words) - 09:34, 30 July 2009
  • If invalid arguments were passed, it returns ''false''. This example creates an ircbot called ''DummyBot'' and makes it connect to a server. During the connection progress bot's current states ar
    1 KB (146 words) - 09:24, 30 July 2009
  • *'''text:''' The wanted [[string]] which is going to be stripped out it's text features. ...resenting the strip options. It is formed from single letters, each having it's own role in the final result.
    2 KB (229 words) - 09:05, 30 July 2009
  • ...not return ''true'' if a channel mode was successfully set or ''false'' if it wasn't set. You can check if the channel mode was set by using callback {{m ...rcbot called ''DummyBot'' makes it connect to a server and join a channel. It also includes an IRC command '!limitusers' which can used to change the cha
    2 KB (271 words) - 19:44, 14 August 2009
  • This function is used to unregister an {{ml_birc|ircbot}} for a resource. It is the opposite function for {{ml_birc|ircRegister}}. bool ircUnregister ( ircbot theBot, [ string resourceName = getResourceName ( getThisResource() ) ] )
    2 KB (187 words) - 16:45, 11 February 2015
  • It it succeeds returns true, in other case returns false if (res == getThisResource()) then
    2 KB (193 words) - 16:43, 11 February 2015
  • Returns the host of specified user if it could be retrieved, or ''false'' if it failed or invalid arguments were passed. ...rcbot called ''DummyBot'' makes it connect to a server and join a channel. It also includes an IRC command '!ban' which can be used to ban users (unable
    2 KB (258 words) - 14:47, 15 August 2009
  • ...es it connect to a server and join a channel called ''#testchannel'' after it has connected. addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    1 KB (195 words) - 18:18, 13 August 2009
  • ...es not return ''true'' if the user was successfully kicked or ''false'' if it failed. You can check if the user was kicked by using callback {{ml_birc|ev ...cbot called ''DummyBot'', makes it connect to a server and join a channel. It also includes an IRC command '!kick' which can be used to kick users from t
    2 KB (250 words) - 16:26, 15 August 2009
  • ...rns a table containing the names of the functions that a resource exports. It will return the exports of the current resource if there is no argument pas table getResourceExportedFunctions ( [ resource theResource = getThisResource( ) ] )
    1 KB (135 words) - 13:45, 10 August 2021
  • ...to this event matches your resource (compare with the value returned by [[getThisResource]] before doing anything. Alternatively you can attach the event to resource
    1 KB (174 words) - 14:02, 2 June 2021
  • ...rcbot called ''DummyBot'' makes it connect to a server and join a channel. It also includes an IRC command '!finduser' which can be used to check if a sp addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), resourceStart )
    2 KB (224 words) - 14:55, 15 August 2009
  • -- getResourceRootElement(getThisResource()) at the bottom means it will only create the gui on this resource start addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), setupWeaponSelection )
    5 KB (309 words) - 11:06, 7 February 2021
  • ...used in HTML pages hosted on the MTA server as part of a resource. To use it, place the following in the ''<head>'' section of your page. <* = call(getResourceFromName("ajax"),"start", getResourceName(getThisResource()) ) *>
    2 KB (265 words) - 20:25, 23 September 2016
  • *'''key''': A string of the key (or it is also called ''property'') you want to get. ..., use string "'''global'''". Leave this to ''nil'' to use '''resource'''([[getThisResource]]). [Note: When resource stops, the style will also be unloaded]
    1 KB (151 words) - 08:02, 23 May 2021
  • Returns a [[float]] size of the resource counting the meta. Otherwise it returns ''false''. local size = getResourceSize(getThisResource())
    4 KB (436 words) - 18:27, 14 November 2021
  • ...es not return ''true'' if the user was successfully banned or ''false'' if it failed. You can check if the user was kicked by using callback {{ml_birc|ev ...cbot called ''DummyBot'', makes it connect to a server and join a channel. It also includes an IRC command '!ban' which can be used to ban users from the
    2 KB (289 words) - 16:23, 15 August 2009
  • *'''button''': the name of the button which will be clicked , it can be ''left'', ''right'', ''middle''. *'''state''': a string of mouse state. In this cause, it is always '''down'''.
    2 KB (311 words) - 10:55, 24 December 2022
  • ...rights to the resource, in which you are using restartResource function or it won't work. -- if it's running,
    2 KB (314 words) - 04:45, 11 August 2019
  • *'''button''': the name of the button which will be clicked , it can be ''left'', ''right'', ''middle''. *'''state''': a string of mouse state. In this cause, it is always '''up'''.
    2 KB (310 words) - 10:55, 24 December 2022
  • ...g only the name of the files (with their respective extensions). Otherwise it returns '''false'''. ...ourceFolder argument #1. The path must contain '/' at the end to make sure it is a directory.", 2)
    8 KB (976 words) - 19:29, 27 September 2023
  • ...behavior of [[isPedInVehicle]] server-sided for [[player]] elements ONLY. It checks if a specified [[player]] is actually in a [[vehicle]] and not just ...fully completed entering a [[vehicle]] and hasn't fully completed exiting it yet, ''false'' otherwise.
    2 KB (263 words) - 17:37, 27 January 2023
  • *'''button''': the name of the button which will be clicked , it can be ''left'', ''right'', ''middle''. *'''state''': a string of mouse state. In this cause, it is always '''down'''.
    3 KB (354 words) - 14:41, 18 February 2021
  • *'''button''': the name of the button which will be clicked , it can be ''left'', ''right'', ''middle''. *'''state''': a string of mouse state. In this cause, it is always '''up'''.
    3 KB (354 words) - 14:42, 18 February 2021
  • '''Note:''' It is required to register your ircbot to the module if you're willing to use bool ircRegister ( ircbot theBot, [ string resourceName = getResourceName ( getThisResource() ) ] )
    3 KB (377 words) - 16:45, 11 February 2015
  • *'''host:''' The host address that will be reformatted. It needs to be in format "nick!user@host". ...rcbot called ''DummyBot'' makes it connect to a server and join a channel. It also includes an IRC command '!formathost <name> <type>' which formats spec
    2 KB (329 words) - 10:57, 30 July 2009
  • ...in the metafile as "raw", then it is passed through a pre-processor before it is returned to the client. This pre-processor works much like PHP or ASP bu This resource is called <* httpWrite( getResourceName(getThisResource()) ) *>
    9 KB (1,404 words) - 03:55, 20 August 2023
  • *'''button:''' the name of the button which will be clicked , it can be ''left'', ''right'', ''middle'' ...ouse button, will be ''down'' if the mouse button was pushed, or ''up'' if it was released. '''Please note currently both ''up'' and ''down'' state are
    3 KB (392 words) - 14:16, 16 February 2021
  • In addition, it is possible to use this function to get information about a resource in the ...6 seconds. Therefore, the default setting of 10 connection attempts means it will be 60 seconds before your script gets a callback about the error. Redu
    7 KB (1,033 words) - 18:07, 26 December 2017
  • ...er), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) -- Set it's text to the player's name excluding colorcodes ...guiGridListSetItemData ( grid, row, column, getPlayerName(player)) -- Set it's data to the player's name with colorcodes
    3 KB (394 words) - 21:18, 7 November 2018
  • Returns a gui window element if it was created successfully, false otherwise. ...dds two tabs to a "tabPanel" tabpanel, and adds some other gui elements to it.
    5 KB (671 words) - 17:10, 5 December 2016
  • Returns a dgs window element if it was created successfully, false otherwise. -- getResourceRootElement(getThisResource()) at the bottom means it will only create the gui on this resource start
    5 KB (673 words) - 15:14, 21 April 2021
  • Returns a gui window element if it was created successfully, false otherwise. ...dds two tabs to a "tabPanel" tabpanel, and adds some other gui elements to it.
    5 KB (685 words) - 07:50, 30 October 2023
  • ...eck whether a file named 'myfile.txt' exists in the resource 'mapcreator', it can be done from another resource this way: ''fileExists(":mapcreator/myfil ...ins the resource pointer for that resource, in other words, the value that getThisResource() function returns.
    3 KB (390 words) - 17:59, 20 December 2023
  • ...dds two tabs to a "tabPanel" tabpanel, and adds some other gui elements to it. -- getResourceRootElement(getThisResource()) at the bottom means it will only create the gui on this resource start
    5 KB (524 words) - 17:16, 5 December 2016
  • {{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}} addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting)
    4 KB (521 words) - 19:19, 21 February 2021
  • MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M :الصيغات المدعومة هي التالي :t'''ملاحظة addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)
    2 KB (148 words) - 22:10, 18 August 2021
  • To use it, you need to make sure you need to have the following packages: Object[] ret = MTARPC.callFunction ( SERVER_HTTP_ADDRESS, "echobot", "getThisResource", null );
    3 KB (360 words) - 20:23, 23 September 2016
  • ...[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue). If it's not specified, white color is used. ...at creates trianglefan primitive with vertices in places that user clicks. It assigns every vertex random color.
    8 KB (1,166 words) - 06:32, 17 June 2023
  • This resource is called <* httpWrite( getResourceName(getThisResource()) ) *> This resource is called <* = getResourceName(getThisResource()) *>
    9 KB (1,486 words) - 21:49, 21 February 2021
  • Returns a gui window element if it was created successfully, false otherwise. -- alttaki getResourceRootElement(getThisResource()), yalnızca bu kaynak başlangıcında gui oluşturacağı anlamına geli
    5 KB (746 words) - 20:46, 9 August 2021
  • ...vent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerClientEvent]] to pass bac ...vents - don't pass a large list of arguments unless you really need to. '''It is marginally more efficient to pass one large event than two smaller ones'
    10 KB (1,405 words) - 22:38, 29 April 2024
  • Under /client/ directory, create a text file and name it "gui.lua". ...clude the new gui.lua file in the meta.xml of the main resource, and label it as a client script:
    16 KB (2,477 words) - 13:47, 8 November 2018
  • This resource is called <* httpWrite( getResourceName(getThisResource()) ) *> This resource is called <* = getResourceName(getThisResource()) *>
    10 KB (1,423 words) - 20:47, 30 June 2022
  • {{IT/MainP}} {{IT/Risorsa}}
    14 KB (1,702 words) - 11:39, 11 June 2023
  • Under /client/ directory, create a text file and name it "gui.lua". ...clude the new gui.lua file in the meta.xml of the main resource, and label it as a client script:
    12 KB (1,771 words) - 22:21, 5 November 2018
  • ...oat values that multiplied to a point will give you the point transformed. It is most useful for matrix calculations such as calculating offsets. For fur if getThisResource() == res then
    5 KB (724 words) - 22:08, 25 December 2020
  • ...mean that all the components are attached to the window and will move with it, but also that any changes done to the parent window will be applied down t ...indow function is now complete, but it won't do anything until we call it. It is recommended to create all GUI when the client resource starts, hide them
    15 KB (2,448 words) - 12:30, 30 June 2013
  • -- this will add all the vehicle options onto the gridlist, it is explained later in this tutorial -- when the resource is started, create the GUI and hide it
    20 KB (2,848 words) - 13:34, 25 November 2018
  • addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createKeypad) -- if its a digit or * or #, then append it to the end of the display
    16 KB (2,326 words) - 12:03, 26 November 2018
  • To use it, you need to add library to your class-path. It's included in the zip file below.
    21 KB (2,792 words) - 20:47, 23 September 2016
  • -- this turns on wordwrap so if your text goes over the edge of the label, it will wrap around and start a new line automatically -- this means it will only trigger when its own resource is started
    17 KB (2,784 words) - 12:50, 13 May 2019
  • -- this turns on wordwrap so if your text goes over the edge of the label, it will wrap around and start a new line automatically -- this means it will only trigger when its own resource is started
    13 KB (1,992 words) - 08:28, 12 November 2018
  • addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
    17 KB (2,599 words) - 20:41, 7 April 2014
  • -- this will add all the vehicle options onto the gridlist, it is explained later in this tutorial -- when the resource is started, create the GUI and hide it
    21 KB (3,277 words) - 12:53, 13 May 2019
  • addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()),
    17 KB (2,762 words) - 06:17, 21 October 2015
  • addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createKeypad) -- if its a digit or * or #, then append it to the end of the display
    17 KB (2,724 words) - 20:58, 15 December 2018
  • addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
    25 KB (574 words) - 09:38, 26 April 2020