Search results

Jump to navigation Jump to search
  • Returns '''true''' if the selected resource is archived, '''false''' if it is not archived, and '''nil''' if some kind of problem occurred. This example stops the resource if it's archived.
    2 KB (214 words) - 03:13, 12 August 2023
  • ...ed off using this function. The animation can not be cancelled by a player it's applied to, and he will not loose health. function onResourceStart()
    1 KB (174 words) - 23:09, 11 January 2023
  • function onResourceStart() ...pSync", vehicleElement, onElementStopSync) -- Bind handler specifically to it
    1 KB (143 words) - 23:50, 6 January 2023
  • ...xample retrieves the current resource's root element and attaches it to an onResourceStart event handler. This causes the event handler to get called only when the '' addEventHandler("onResourceStart", resRoot, function()
    1 KB (157 words) - 19:40, 14 March 2023
  • ...xample retrieves the current resource's root element and attaches it to an onResourceStart event handler. This causes the event handler to get called only when the '' -- create a function to handle the onResourceStart event
    2 KB (253 words) - 18:38, 17 December 2023
  • .... It returns empty string if the resource is on root ''resources'' folder. It returns '''false''' if the resource could not be found. This example outputs the path of the current resource when it is started.
    976 bytes (111 words) - 13:12, 10 August 2021
  • ...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
  • ...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
  • '''Example:''' Sets the rain (So it can detect it) before returning it. (In this case, when resource starts.) outputChatBox("Looks like it's going to be a rainy day!",255,130,130,false)
    2 KB (192 words) - 23:12, 11 January 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
  • ...the ACL was successfully removed from the ACL group, ''false''/''nil'' if it could not be removed for some reason, ie. either of the elements were inval <syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function()
    1 KB (176 words) - 09:06, 5 February 2021
  • ...the ACL was successfully removed from the ACL group, ''false''/''nil'' if it could not be removed for some reason, ie. either of the elements were inval <syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function()
    1 KB (176 words) - 08:35, 5 February 2021
  • 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
  • Returns a team element if it was successfully created, ''false'' if invalid arguments are passed or a te ...ample 1:''' This example creates a new team for a player, then adds him to it.
    2 KB (333 words) - 00:02, 24 July 2018
  • This event is triggered when a player trips anti-cheat detections. It can be used to script a white/blacklist of custom d3d9.dll files, or a whit ...e using this event should call [[resendPlayerACInfo]] for each player in [[onResourceStart]]}}
    4 KB (540 words) - 23:43, 10 May 2019
  • ...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
  • '''Note:''' It is required to register your ircbot to the module if you're willing to use ...2''' starts, it checks if ircbot named ''DummyBot'' exists and if it does, it registers that bot's callbacks for resource '''ircecho2'''. Now ''DummyBot'
    3 KB (377 words) - 16:45, 11 February 2015
  • ...getElementsByType( "player" ) )'' but simply ''iterElements( "player" )''. It's very useful if you have many for loops in your code. This example will iterate through all players and vehicles. It will heal the players, give them $1000, send them a message informing them
    1 KB (163 words) - 08:14, 29 October 2023
  • .... 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
  • ...if (getColShapeType (v) == 4) then -- if it's a polygon colshape do it otherwise don't addEventHandler ("onResourceStart", resourceRoot, setPolygonsHeight)
    1 KB (167 words) - 21:34, 23 September 2021
  • ...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
  • Returns a string with the resource name in it, or ''false'' if the resource does not exist. addEventHandler("onResourceStart", getRootElement(),
    964 bytes (121 words) - 22:07, 10 February 2024
  • ...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
  • ...integer being the moon size that is currently set, depending on which side it is used. addEventHandler( "onResourceStart", resourceRoot, handleResourceStart )</syntaxhighlight>
    923 bytes (112 words) - 17:07, 20 May 2020
  • 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
  • This example makes any weather very clear when the resource that contains it starts. addEventHandler("onResourceStart", resourceRoot, makeWeatherClear)
    982 bytes (127 words) - 10:16, 18 May 2014
  • *'''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
  • ...'true'' if the player was successfully logged out, ''false'' or ''nil'' if it failed for some reason, ie. the player was never logged in. -- Trigger it when the resource (re)starts
    1 KB (174 words) - 15:06, 12 April 2021
  • *'''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
  • addEventHandler ( "onResourceStart", resourceRoot, onThisResourceStart ) -- by using root, it will work for any vehicle (even if it wasn't created via this resource)
    1 KB (180 words) - 17:17, 21 November 2023
  • Returns ''true'' if the garage is open, ''false'' if it is closed or an invalid garage ID was given. ...s a garage door when a player enters a collision shape near it, and closes it when they leave:
    2 KB (227 words) - 16:45, 11 February 2015
  • ...letion, the ircbot pointer will nolonger be valid. If ircbot is connected, it will be disconnected from the server. addEventHandler ( "onResourceStart", getResourceRootElement (), resourceStart )
    1,011 bytes (115 words) - 16:46, 11 February 2015
  • ...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
  • MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M :الصيغات المدعومة هي التالي :t'''ملاحظة function onResourceStart()
    2 KB (148 words) - 22:10, 18 August 2021
  • ...pearing not to load them at all. Refer to the second example on that page, it's a client-side function and cannot be used next to assignLOD.}} This example shows how to correctly call the function by embedding it into the target element's createObject (for map models).
    2 KB (225 words) - 19:07, 27 September 2023
  • ...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 example creates an ircbot called ''DummyBot'' and stores it to variable theBot on resource start. addEventHandler ( "onResourceStart", getResourceRootElement (), resourceStart )
    982 bytes (128 words) - 16:46, 11 February 2015
  • ...tive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> ...ACL, ''false'' or ''nil'' if it could not be removed for some reason, ie. it didn't exist in the ACL.
    2 KB (244 words) - 08:37, 5 February 2021
  • This function is used to unregister an {{ml_birc|ircbot}} for a resource. It is the opposite function for {{ml_birc|ircRegister}}. ...ircbot called ''DummyBot'' on when resource '''ircecho''' starts and makes it unable to call the callback functions inside the resource.
    2 KB (187 words) - 16:45, 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
  • It it succeeds returns true, in other case returns false addEventHandler("onResourceStart", getRootElement(), resourceStart)
    2 KB (193 words) - 16:43, 11 February 2015
  • ...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
  • '''Important:''' If you attach this event to the root element it will called when ''any'' resource starts, not just the resource your script addEventHandler ( "onResourceStart", root, displayLoadedRes )
    1 KB (174 words) - 14:02, 2 June 2021
  • This example will add a command called '/delnode' and it will create an xml file called 'test.xml'. addEventHandler("onResourceStart", resourceRoot, function()
    1 KB (143 words) - 20:13, 2 January 2015
  • ...number of simultanuous connections is 5. There is no limit for ircbots but it is not possible to connect more than 5 bots at a time. This example creates an ircbot called ''DummyBot'' and makes it connect to irc.gtanet.com server on resource start.
    1 KB (204 words) - 16:45, 11 February 2015
  • ...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
  • ...amp). You can remove the door by using [[removeWorldModel]] and recreating it for later with [[moveObject]].}} ...s a garage door when a player enters a collision shape near it, and closes it when they leave:
    2 KB (284 words) - 14:08, 7 December 2021
  • :For example, if there is a file named 'settings.xml' in the resource 'ctf', it can be accessed from another resource this way: ''getResourceConfig(":ctf/s ...local subNode = xmlFindChild( node, "group", 0 ) -- get a subnode in it
    2 KB (248 words) - 18:45, 29 April 2012
  • ...Of course only those which are available clientside. It doesn't matter if it's a MTA function, a Lua standard function or a custom function. ...tside to avoid data being lost. If you don't need this feature just delete it.
    3 KB (334 words) - 09:37, 24 May 2012
  • This function creates a table in the database. It doesn't do anything when the table already exists. You can use this functio -- create our table, if it doesn't already exist
    2 KB (249 words) - 15:13, 4 October 2016
  • ...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
  • ...tive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> ...f successful, otherwise ''false'' or ''nil'' if the aclGroup is invalid or it fails for some other reason.
    2 KB (240 words) - 06:35, 6 February 2021
  • ...d theResource == blipsResource ) then -- check if the resource started was it addEventHandler ( "onResourceStart", getRootElement(), onStart )
    1 KB (193 words) - 13:04, 4 February 2020
  • ...rights to the resource, in which you are using restartResource function or it won't work. ...esourceStop]] event triggered and the restarted instance will receive an [[onResourceStart]] event. Remember that the element and resource variables will be invalidat
    2 KB (314 words) - 04:45, 11 August 2019
  • ...tive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> addEventHandler("onResourceStart",resourceRoot,function()
    2 KB (181 words) - 07:10, 6 February 2021
  • ...tive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --> <syntaxhighlight lang="lua">addEventHandler("onResourceStart", resourceRoot, function()
    2 KB (179 words) - 06:36, 6 February 2021
  • ...'true'' if the player was successfully logged out, ''false'' or ''nil'' if it failed for some reason, ie. the player was never logged in. addEventHandler("onResourceStart", resourceRoot, logoutAll) -- تسجيل خروج جميع اللاعبين
    1 KB (86 words) - 03:50, 28 August 2012
  • ...(but this isn't a valid resource) or if the name you specify isn't valid. It could also fail if the disk was full or for other similar reasons. Won't wo addEventHandler("onResourceStart", resourceRoot, renameReloadResource);
    1 KB (181 words) - 13:37, 10 August 2021
  • ...returns the corresponding child node if it exists. If no nodes are found, it returns an empty table. Returns ''false'' in case of failure. addEventHandler("onResourceStart", getResourceRootElement(),
    3 KB (326 words) - 20:29, 23 September 2016
  • ...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
  • ...admin rights to the resource, in which you are using removeBan function or it won't work.}} <syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function()
    1 KB (178 words) - 17:09, 6 December 2023
  • ...if you want to create a config named 'settings.xml' in the resource 'ctf', it can be created from another resource this way: ''addResourceConfig(":ctf/se addEventHandler("onResourceStart",getResourceRootElement(),onStart)
    1 KB (190 words) - 16:42, 11 February 2015
  • ...loat being the max velocity that is currently set, depending on which side it is used. addEventHandler( "onResourceStart", resourceRoot, handleResourceStart )</syntaxhighlight>
    2 KB (222 words) - 11:53, 22 April 2013
  • ...lag />) in the .map file, the using "flag" as the type argument would find it. ...rInVehicle ( thePlayer ) ) then -- if the player is in a vehicle, announce it
    6 KB (823 words) - 20:00, 14 October 2018
  • *'''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
  • ...нкция поддерживает только следующие форматы: MP3, WAV, OGG, RIFF, MOD, XM, IT и S3M. function onResourceStart()
    4 KB (181 words) - 22:10, 18 August 2021
  • ...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 addEventHandler("onResourceStart", resourceRoot,
    2 KB (179 words) - 14:23, 23 January 2016
  • *Támogatott audió formátumok: MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS. function onResourceStart()
    3 KB (520 words) - 22:17, 19 September 2021
  • *Die unterstützten Audio-Formate sind MP3, WAV, OGG, RIFF, MOD, XM, IT und S3M. function onResourceStart()
    3 KB (427 words) - 22:10, 18 August 2021
  • Returns a ped element if it was successfully created. addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad )
    3 KB (353 words) - 05:59, 5 November 2023
  • addEventHandler("onResourceStart", resourceRoot, function(res) outputChatBox("File was not successfully copied, probably because it doesn't exist.", root, 100, 0, 0)
    3 KB (332 words) - 17:35, 20 December 2023
  • ...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
  • addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) {{Issue|8790|Using setElementHealth on a dead ped makes it invincible}}
    3 KB (530 words) - 17:21, 30 December 2018
  • addEventHandler( "onResourceStart", getResourceRootElement(), outputChatBox("Our group is in the MTA Community Site, it's called: "..groupName..", our groups is "..public.." and was registered in
    4 KB (489 words) - 09:25, 23 June 2016
  • {{IT/MainP}} {{IT/Risorsa}}
    14 KB (1,702 words) - 11:39, 11 June 2023
  • eventName -- the name of the event ("onResourceStart", "onPlayerWasted" etc.) ...[https://wiki.multitheftauto.com/wiki/Resource_Web_Access (more info about it)]:
    4 KB (530 words) - 15:34, 11 November 2023
  • <syntaxhighlight lang="lua">addEventHandler( "onResourceStart", resourceRoot, -- Otherwise it will look all funny
    3 KB (398 words) - 01:07, 10 April 2011
  • ...seOfModel]], or you can estimate it yourself and just spawn the vehicle so it drops to the ground. ...ty with some scripts. It never had any effect, but it is read by the code. It is recommended to ignore this argument, passing ''false'' or the ''variant1
    10 KB (1,271 words) - 08:17, 4 December 2020
  • ...times can have a performance impact on the server. For optimal performance it is recommended that you use dbConnect only once when the resource starts, a ...e server's global databases directory is used. The file will be created if it does not exist.
    8 KB (1,087 words) - 05:31, 9 February 2024
  • * Remember that 99% of the time it's a bug in your script, not an MTA bug! Don't report something to GitHub Is ...he long run as you'll spend less time being confused when you come back to it in a weeks time to debug a problem.
    8 KB (1,269 words) - 17:30, 2 August 2023
  • addEventHandler ( "onResourceStart", getResourceRootElement(), tworzeniePeda ) {{PL/Issue|8790|Using setElementHealth on a dead ped makes it invincible|Użycie funkcji setElementHealth na martwym pedzie, czyni go nie
    5 KB (690 words) - 19:15, 20 July 2016
  • -- if a player triggered it, not the admin, addEventHandler( "onResourceStart", resourceRoot,
    8 KB (656 words) - 15:10, 11 September 2021
  • {{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}} addEventHandler ("onResourceStart", resourceRoot, fillDock)
    4 KB (479 words) - 10:12, 30 January 2022
  • {{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}} addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), fillDock)
    4 KB (521 words) - 19:19, 21 February 2021
  • ...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 addEventHandler("onResourceStart", getRootElement(), startedThisResource)
    5 KB (724 words) - 22:08, 25 December 2020
  • -- if a player triggered it, not the admin, -- Create the actual vehicle and set it as a children of our dummy element
    10 KB (1,288 words) - 20:46, 20 June 2021
  • <!--*'''bindName:''' The name for this key bind when it appears in the client's settings dialog.--> addEventHandler('onResourceStart', resourceRoot, -- Quando o resource iniciar, a tecla de todos os que estiv
    11 KB (1,541 words) - 16:43, 21 February 2021
  • * Made it able to set velocity on (dynamic) objects * Added crash handler for Linux (It outputs log files in dumps/)
    13 KB (1,667 words) - 08:55, 4 November 2017
  • As we can see, it provides several parameters: the player who called the command, the command
    26 KB (2,258 words) - 00:57, 4 April 2022
  • <script src="script.lua" type="client"/> <!-- define it separately on client --> * It doesn't remove Lua files which were previously downloaded.
    68 KB (8,381 words) - 16:29, 23 April 2024