Search results

Jump to navigation Jump to search
  • addEventHandler("onClientResourceStart", resourceRoot, createAndFire) This example will create an M4, attach it to the local player and fire it every frame. Be aware that neither the weapon nor the shots are synced betw
    2 KB (220 words) - 17:35, 4 May 2024
  • ...-side resource triggers the [[onClientResourceStart]] event when the files it requires are downloaded. addEventHandler("onClientResourceStart", resourceRoot, checkTransfer)
    1 KB (162 words) - 12:02, 4 October 2020
  • This example creates a gui grid list, fills it with the names of the connected players and prints the number of rows (play <syntaxhighlight lang="lua">function onClientResourceStart ()
    2 KB (172 words) - 09:18, 12 July 2023
  • If the function succeeds it returns ''true'', if it fails it returns ''false''. ...button when the resource starts and defines a console command that toggles it between enabled (clickable) and disabled (not clickable).
    2 KB (224 words) - 23:13, 11 January 2023
  • '''Example:''' Sets the rain (So it can detect it) before returning it. (In this case, when resource starts.) addEventHandler("onClientResourceStart", resourceRoot, function()
    2 KB (192 words) - 23:12, 11 January 2023
  • * '''theElement''': The element you want to center it. addEventHandler( "onClientResourceStart", resourceRoot, function()
    2 KB (179 words) - 02:19, 5 May 2017
  • *'''parent:''' the gui-element this scrollbar is attached to. By default, it is nil, meaning the widget is attached to the background. Returns a ''gui-scrollbar'' if it was created successfully, ''false'' otherwise.
    2 KB (255 words) - 08:05, 30 October 2023
  • ...succeeds, it returns a string with the value of the property. If it fails, it returns ''false''. ...button when the resource starts and defines a console command that toggles it between enabled (clickable) and disabled (not clickable).
    1 KB (169 words) - 17:17, 21 November 2018
  • ...no-3D sounds (those created by [[playSound]]), it only makes sense to use it with 3D sounds (created by [[playSound3D]]). Please refer to [[setSoundPann ...ns ''true'' if the sound is valid and it has panning enabled, ''false'' if it does not or is not valid.
    2 KB (247 words) - 14:29, 19 July 2018
  • ...no-3D sounds (those created by [[playSound]]), it only makes sense to use it with 3D sounds (created by [[playSound3D]]). Please refer to [[setSoundPann ...ns ''true'' if the sound is valid and it has panning enabled, ''false'' if it does not or is not valid.
    2 KB (249 words) - 00:24, 18 August 2021
  • ...hat this function does not affect collision - the building is still there, it's just invisible: addEventHandler ("onClientResourceStart", resourceRoot, init)
    1 KB (127 words) - 20:36, 23 September 2021
  • This example creates a DGS window and sets it to be not movable -- set it to be not movable
    985 bytes (127 words) - 11:00, 20 January 2018
  • ...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
  • This example creates a gui window and sets it to be not sizable -- set it to be not sizable
    984 bytes (124 words) - 11:00, 20 January 2018
  • ...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
  • This example creates a gui window and sets it to be not movable -- set it to be not movable
    1 KB (133 words) - 11:31, 7 August 2019
  • <syntaxhighlight lang="lua">addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), -- only execute the code wh ...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
  • This example creates a gui window and sets it to be not sizable -- set it to be not sizable
    1 KB (130 words) - 11:35, 7 August 2019
  • .... Remember to use [[setElementDimension]] after creating the sound to play it outside of dimension 0. ...only supported audio formats are MP3, WAV, OGG, FLAC, RIFF, MOD, WEBM, XM, IT and S3M.
    3 KB (451 words) - 16:34, 3 November 2023
  • <syntaxhighlight lang="lua">addEventHandler( "onClientResourceStart", resourceRoot, -- 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 (142 words) - 23:20, 11 January 2023
  • Returns [[element]] of the progress bar if it was created succesfully, ''false'' otherwise. ...es a progress bar to player's screen on client resource start and destroys it when client resource stops.
    2 KB (309 words) - 08:09, 30 October 2023
  • 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
  • if password then -- if it was successfully created guiEditSetMasked( password, true ) -- make it masked
    1 KB (139 words) - 16:44, 14 May 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 (176 words) - 20:57, 7 November 2018
  • It's recommended to use server-side function with appropriate [[mtaserver.conf ...A:SA easter egg, which increases the size of the moon every time you shoot it with a sniper rifle (default: false)
    4 KB (412 words) - 17:40, 10 September 2023
  • 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
  • ...ello" and "World!" and chooses randomly which of these two grid list items it will retrieve. addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )</syntaxhighlight>
    3 KB (325 words) - 18:47, 28 October 2021
  • ...ere the camera actually wants to be, the camera will try to be in front of it. This function can disable that. This function enables it to look through cars
    1 KB (145 words) - 06:20, 20 January 2022
  • Note = The returned value it's a [[Vector2]]| addEventHandler ( "onClientResourceStart", resourceRoot, checkResolutionOnStart )
    1 KB (181 words) - 22:38, 3 May 2021
  • if advert then -- if it was successfully created guiEditSetReadOnly( advert, true ) -- make it read-only
    1 KB (152 words) - 20:57, 7 November 2018
  • * ''false'' if it can't or if invalid arguments are passed. This example creates an object when the resource starts and sets it to be breakable.
    1 KB (147 words) - 21:31, 16 April 2023
  • ...'true'' if the player was successfully logged out, ''false'' or ''nil'' if it failed for some reason, ie. the player was never logged in. ...is (re)started. This would be handy for resources that show a login screen onClientResourceStart.
    1 KB (174 words) - 15:06, 12 April 2021
  • ...te|The file functions should not be used to implement configuration files. It is encouraged to use the XML functions for this instead.}} * '''overwrite''': If set to true it will overwrite a file that already exists at copyToFilePath.
    2 KB (300 words) - 17:35, 20 December 2023
  • Returns the item ID if it has been created, ''false'' otherwise. addEventHandler("onClientResourceStart", resourceRoot, function()
    839 bytes (98 words) - 09:27, 17 January 2021
  • 因此,我们需要为GUI窗口创建一个'''事件触发器''',事件触发器的事件为 "[[onClientResourceStart]]": addEventHandler("onClientResourceStart", getResourceRootElement(),
    16 KB (646 words) - 13:09, 7 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
  • ...function works more like ''try to free up at least this amount of bytes''. It usually ends up freeing everything that isn't currently needed (which, depe addEventHandler ("onClientResourceStart", resourceRoot,
    1,004 bytes (119 words) - 20:52, 23 September 2021
  • addEventHandler( "onClientResourceStart", resourceRoot, guiWindowSetMovable( window, false ) -- make it unmovable
    1 KB (114 words) - 18:21, 6 August 2019
  • ...on gets the dimensions of [[Texture_pixels|pixels]] contained in a string. It works with all pixel formats. addEventHandler('onClientResourceStart', resourceRoot, function()
    1 KB (134 words) - 08:53, 8 February 2021
  • ...ot virtualized (streamed out from GTA) when the player moves far away from it. This function only works in elements with a physical representation in the ...he same type or not) to stream out, GTA will always try to render them, so it can cause a noticeable FPS drop.}}
    2 KB (272 words) - 15:57, 13 August 2015
  • ...uses that occur when a new model is displayed for the first time. However, it can cause the new models to appear slightly later than they might have othe addEventHandler("onClientResourceStart", resourceRoot, function()
    2 KB (267 words) - 20:11, 23 September 2021
  • This example creates a selector with all server vehicles on it, with a command to clear the selector. addEventHandler ( "onClientResourceStart", resourceRoot,
    1 KB (129 words) - 20:16, 18 February 2023
  • addEventHandler( "onClientResourceStart", resourceRoot, guiWindowSetSizable( window, false ) -- make it unsizable
    1 KB (121 words) - 14:20, 27 April 2020
  • * '''weapon''': If the type is a Weapon pickup, then it represents the [[Weapon|weapon ID]] of the weapon pickup the 'ammo' field m This example changes the pickup time every time someone hits it
    4 KB (527 words) - 08:10, 4 November 2020
  • addEventHandler( "onClientResourceStart", resourceRoot, ...mo(customWeapon, 99999) -- Set the ammo in clip of the weapon to 99999, so it never should reload
    2 KB (204 words) - 21:44, 7 May 2017
  • ...will cause an explosion and will kill the driver and any passengers inside it. ...:''' if this argument is ''true'' then the vehicle will explode, otherwise it will just be blown up silently.
    3 KB (422 words) - 22:33, 18 December 2014
  • ...te|The size can't be less than 5 or more than 150. Use this function after onClientResourceStart, otherwise some characters may be displayed incorrectly.}} =====It is highly recommended that [[dxSetTestMode]] is used when writing and testi
    2 KB (227 words) - 12:26, 21 January 2024
  • ...lor of a single pixel for [[Texture_pixels|pixels]] contained in a string. It only works with ''''plain'''' format pixels. This example creates a 64x64 texture with random pixel colors, and draw it on the screen.
    2 KB (199 words) - 17:32, 1 December 2018
  • ...image at the resource's start and changes its size to the original size so it keeps the best quality. addEventHandler("onClientResourceStart", resourceRoot,
    1 KB (144 words) - 14:20, 20 May 2018
  • * '''firingRate:''' The weapon firing rate. It seems to be a kind of frecuency value, so the lower the quicker the [[Eleme addEventHandler("onClientResourceStart", resourceRoot,
    1 KB (147 words) - 14:50, 4 July 2016
  • This example creates a combo box with all server vehicles on it, with a command to clear the combo box. addEventHandler ( "onClientResourceStart", resourceRoot,
    1 KB (144 words) - 20:38, 7 November 2018
  • This example creates a combo box with all server vehicles on it, with a command to clear the combo box. addEventHandler ( "onClientResourceStart", resourceRoot,function ( )
    1 KB (144 words) - 11:13, 20 January 2018
  • ...d allows you to set/get a color of label on the button when you hover over it. ...es an edit box alongside an "Output!" button. When the button is clicked, it will output the message in the text box into the Chat Box.
    2 KB (227 words) - 16:35, 11 February 2015
  • This example creates a player list on the right of the screen and fills it with players online and sets the grid list item color according to their na When the player clicks on a grid list item, it'll output the color of it.
    2 KB (275 words) - 21:13, 7 November 2018
  • <syntaxhighlight lang="lua">addEventHandler("onClientResourceStart",resourceRoot,function() outputChatBox("Hud Component: "..component.." is visible!") --if it is then tell the client that
    2 KB (281 words) - 20:46, 6 October 2013
  • This example creates a button. The button has two functions attached to it, one is triggered when user clicks the button (to change text on the button addEventHandler ( "onClientResourceStart", getResourceRootElement(),
    2 KB (298 words) - 16:35, 11 February 2015
  • *'''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
  • *'''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
  • This example creates a gui combo box, fills it with the names of the connected players and prints the number of items (pla addEventHandler('onClientResourceStart',resourceRoot,function()
    1 KB (153 words) - 13:20, 22 July 2019
  • ...See [[svgSetUpdateCallback]] for setting an svg's callback function after it has been created. ...asic example of how you can create an SVG from raw data (or path) and draw it with [[dxDrawImage]] via [[onClientRender]].
    4 KB (530 words) - 19:33, 30 November 2022
  • This code creates a grid list and fills it with the names of the connected players. When the user selects an item, its if ( column ) then -- If the column has been created, fill it with players
    2 KB (275 words) - 16:50, 11 June 2020
  • *'''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 only the ''up'' state is supported.'
    2 KB (337 words) - 16:40, 19 October 2022
  • This function changes the drawing destination for the dx functions. It can be used to select a previously created render target, or if called with addEventHandler("onClientResourceStart", resourceRoot,
    3 KB (347 words) - 20:40, 23 December 2018
  • {{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}} -- OnClientResourceStart function that creates the water.
    4 KB (479 words) - 10:12, 30 January 2022
  • Returns the column id if it was created, ''false'' otherwise. This example creates a player list on the right side of the screen and fills it with the currently connected players.
    2 KB (250 words) - 07:59, 20 June 2018
  • This example creates a button. The button has two functions attached to it, one is triggered when user clicks the button (to change text on the button addEventHandler ( "onClientResourceStart", getResourceRootElement(),
    2 KB (343 words) - 16:35, 11 February 2015
  • ...opens an image, read its pixels, convert the pixels to PNG, and then save it. (You can use [http://i1325.photobucket.com/albums/u630/Tourmalinelisa2/128 addEventHandler('onClientResourceStart', resourceRoot, function()
    1 KB (167 words) - 13:50, 14 October 2018
  • *'''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
  • This function changes the drawing destination for the dx functions. It can be used to select a previously created render target, or if called with addEventHandler("onClientResourceStart", resourceRoot,
    3 KB (358 words) - 20:42, 23 December 2018
  • *'''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
  • Returns ''true'' if the passed element is in water, ''false'' if it isn't, or if the element is invalid. addEventHandler ("onClientResourceStart", resourceRoot,
    2 KB (200 words) - 00:23, 18 April 2015
  • This example creates a dgs grid list, fills it with the names of the connected players and prints the number of rows (play addEventHandler ( "onClientResourceStart", getResourceRootElement(), clientsideResourceStart )</syntaxhighlight>
    2 KB (171 words) - 13:46, 18 January 2018
  • ...rid list and adds 4 columns to it when the script starts. After 3 seconds, it randomly deletes a column and outputs to the chat box which column was dele addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )
    2 KB (225 words) - 13:44, 18 January 2018
  • ...Box("The sound panning was disabled, so it won't annoy you when the camera it's in a side anymore!", 0, 255, 0) addEventHandler("onClientResourceStart", resourceRoot, testPanning)
    2 KB (305 words) - 00:24, 18 August 2021
  • Returns the value of the node as a [[string]] if it was received successfully, ''false'' otherwise. if xmlFile then -- If it's indeed opened
    5 KB (656 words) - 20:50, 12 May 2019
  • It is worth noting that the same could be achieved with the following: ...Element) is a built in MTA variable and therefore we do not have to define it.
    4 KB (345 words) - 10:21, 16 April 2017
  • {{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}} -- OnClientResourceStart function that creates the water.
    4 KB (521 words) - 19:19, 21 February 2021
  • *'''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
  • ...sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is
    1 KB (183 words) - 01:52, 20 July 2018
  • This example creates a player list on the right of the screen and fills it with players online and sets the grid list item color according to their na if ( column ) then --If the column has been created, fill it with players
    2 KB (255 words) - 21:13, 7 November 2018
  • This example creates a player list on the right of the screen and fills it with players online and sets the combo box item color according to their na addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList )
    1 KB (180 words) - 12:48, 7 February 2022
  • ...sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is
    2 KB (209 words) - 09:42, 3 March 2019
  • ...ere the camera actually wants to be, the camera will try to be in front of it. This function can disable that. addEventHandler ("onClientResourceStart",resourceRoot,enableCameraThoughCars)
    1 KB (196 words) - 10:31, 11 August 2019
  • ...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
  • if xmlFile then -- If it's indeed opened ...local success = xmlNodeSetValue ( node, "somevalue" ) -- Set the value of it
    5 KB (633 words) - 20:52, 12 May 2019
  • ...нкция поддерживает только следующие форматы: MP3, WAV, OGG, RIFF, MOD, XM, IT и S3M. addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)
    4 KB (181 words) - 22:10, 18 August 2021
  • This example creates a player list on the right of the screen and fills it with players online and sets the combo box item color according to their na addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList )
    2 KB (197 words) - 05:33, 19 June 2018
  • if xmlFile then -- If it's indeed opened local success = xmlNodeGetValue ( node ) -- Get the value of it
    5 KB (603 words) - 11:29, 25 December 2014
  • addEventHandler("onClientResourceStart", resourceRoot, ...0, myScreenSource ) -- Now use myScreenSource as a material and draw it lots of times
    2 KB (172 words) - 10:38, 15 October 2018
  • if xmlFile then -- If it's indeed opened ...local success = xmlNodeSetValue ( node, "somevalue" ) -- Set the value of it
    5 KB (579 words) - 11:36, 25 December 2014
  • ...[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
  • *Támogatott audió formátumok: MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS. addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)
    3 KB (520 words) - 22:17, 19 September 2021
  • addEventHandler( "onClientResourceStart", resourceRoot, if ( column ) then --If the column has been created, fill it with players
    2 KB (183 words) - 19:14, 13 June 2019
  • ...': Los formatos de audio soportados sólo son MP3, WAV, OGG, RIFF, MOD, XM, IT y S3M. addEventHandler( 'onClientResourceStart', resourceRoot,
    1 KB (186 words) - 23:38, 21 April 2013
  • ...sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is
    2 KB (246 words) - 20:42, 16 August 2018
  • addEventHandler("onClientResourceStart", resourceRoot, ...0, myScreenSource ) -- Now use myScreenSource as a material and draw it lots of times
    2 KB (208 words) - 17:57, 17 October 2018
  • ...rid list and adds 4 columns to it when the script starts. After 3 seconds, it randomly deletes a column and outputs to the chat box which column was dele addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )
    3 KB (285 words) - 10:20, 30 January 2022
  • *Die unterstützten Audio-Formate sind MP3, WAV, OGG, RIFF, MOD, XM, IT und S3M. addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)
    3 KB (427 words) - 22:10, 18 August 2021
  • ...want a custom weapon to take into account recoil, you will have to script it by firing at fixed coordinates.}} * '''theTarget:''' The [[element]] to shoot at. It can be a [[player]], [[ped]], [[vehicle]] or [[object]].
    4 KB (551 words) - 01:05, 16 January 2023
  • *'''parent:''' the gui-element this scrollpane is attached to. By default, it is nil, meaning the widget is attached to the background. addEventHandler("onClientResourceStart",resourceRoot,
    2 KB (317 words) - 08:06, 30 October 2023
View (previous 100 | ) (20 | 50 | 100 | 250 | 500)