Jump to content

Search the Community

Showing results for tags 'xml'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me






    Map files

    Map files Table of contents: Introduction How to read a map file? Broken map file, what to do? Editor bugged, what to do? Modify your maps outside of MTA Extra links Introduction A map-file! What is that? The name already gives away the definition. It is a file which contains a MTA map. The format makes maps portable, so that you can send them over to your friends. You can recognize map-files by the extension: .map Here is an example of a map: Syntax highlight When you open a map file in your te
  2. I want to create a "system" to update any xml (or only the vehicles.xml) without restart the Freeroam. Like, i create a second resource with alls xml's ex: resouce1: freeroam, resource2 = xmllist, then i put in xml options in freeroam, the ':xmllist/vehicles.xml' for example. (everything alright) But, when i restart the xmllist, do not update the freeroam, and i want create a command or a way to "refresh" the xml/gridlist. I found a way, but it "duplicate" the freeroam window. function testeeetalkei() wndCreateVehicle = { 'wnd', text = 'Create vehicle', width
  3. This is the dumbest question I've ever asked on this forum, but I have problem even not only with this. So, how can I add scripts from different folders in my meta.xml? And in these scripts, how can I load xml files from different folders, too? Any idea? If yes, please, show me example I know, that I would use xml = xmlLoadFile("filename.xml") But how to load xml in different folders? Same <script src="script.Lua" type="server"/> But how to tell MTA to load script from different folder?
  4. I tried to load a file, that is in a subfolder, nothing's happening, no errors in console. What's the problem (all code below)? Line of code in script, to load xml file: xml = xmlLoadFile("cars/saved.xml") meta.xml: <file src="cars/saved.xml"/> What's wrong? BTW, everything exists. IDK what's wrong with this, everything's is existing, file is assigned into xml. I clearly don't know what's worng.
  5. Tell me, what is better: MySQL, SQLite or XML? (You need to save (and retrieve) many user settings)
  6. Z4Zy

    Fix XML

    Hello Everybody ! Please help me to fix below script with XML file. There's a XML file called 'codes.xml'. Inside of that XML file looks like below. <pass characters="1234" allowed="true" /> <pass characters="5678" allowed="true" /> <pass characters="9012" allowed="true" /> Characters shown in above XML is used as a security key for open a certain door. Each character set can be used only once. There's a LUA script which is not completed yet can be seen below. function open(player, command, code) if code then --- addCommandHandler(
  7. Buenas a todos, Me ha surgido una duda cuando trate trabajar por primera vez con archivos de tipo 'XML'. Bueno, lo que pasa es que al intentar crear un archivo XML con la función xmlCreateFile (función compartida) en un archivo lua de tipo "server" el XML se crea con normalidad y aparece en mi resource; pero cuando intento crearlo en un archivo lua tipo client éste no aparece en mi resource. ¿Alguien sabe el porque?, no me tira ningún error y al parecer ejecuta la función de manera correcta, ¿Tiene algún sentido esto? Muchas gracias.
  8. Здравствуйте. Скачал я базу данных xml, долго редактировал под свой сервер. Дело в том что я запретил команду логин,регистер и т.д. Мне нужно что бы xml база запускалась не когда игрок залогиниться а когда зайдёт на сервер. local ALLOW_SAVE = true; local SAVE_TIME = 60; function onPlayerLogin(_,account) if not xmlLoadFile("users/"..getAccountName(account)..".xml") then local XMLROOT = xmlCreateFile("users/"..getAccountName(account)..".xml","user"); xmlCreateChild(XMLROOT, "Nickname") xmlCreateChild(XMLROOT, "Money") xmlCreateChild(XMLROOT, "Skin") xmlSaveFile(XMLROOT); xmlUnl
  9. anufis_ok

    XML Join

    Hello.I need that players do not register and the code is saved and joined to the server. Help please. local ALLOW_SAVE = true; local SAVE_TIME = 60; function onPlayerLogin(_,account) if not xmlLoadFile("users/"..getAccountName(account)..".xml") then local XMLROOT = xmlCreateFile("users/"..getAccountName(account)..".xml","user"); xmlCreateChild(XMLROOT, "Nickname") xmlCreateChild(XMLROOT, "Money") xmlCreateChild(XMLROOT, "Skin") xmlSaveFile(XMLROOT); xmlUnloadFile(XMLROOT); else local XMLROOT = xmlLoadFile("users/"..getAccountName(account)..".xml"); local Money = xmlNode
  10. السلام عليكم ورحمة الله وبركاتة كيف الحال ان شاء الله بخير انا الان بدي اسوي عملية نقل بيانات و اضن مو ضروري اقلكم الهدف حق النقل لأيش لانو ما رح يكون له فايدة بنسبة لطلبي انما انا بدي اعرف ايه افضل اني اخلي نفل البيانات من تطبيق اندرويد الى موقع باللغة Jason or XML والي يقلي واحدهمنهم يقلي ليش مشان استفيد واشوف اذا تتناسب مع الشغل حقي
  11. Hello, I'm trying to pass my server side settings defined in my meta.xml to the client. However, when passing the table of XML data to the client, the data does not persist. Here's my server side code: addEvent("onClientRequestResourceSettings", true) addEventHandler("onClientRequestResourceSettings", resourceRoot, function() local xml = xmlLoadFile("meta.xml") local settingsNode = xmlFindChild(xml, "settings", 0) if(settingsNode) then local settings = xmlNodeGetChildren(settingsNode) triggerClientEvent(client, "onServerProvideResourceSe
  12. Olá senhores. Estou fazendo um script cujo menu GUI é construído a partir de informações de um arquivo.xml No arquivo.xml, estão os textos que devem aparecer nos botões e texto do painel. O problema é que em alguns botões, preciso colocar quebra de linha. (\n) [contra-barra + N) Se eu criar um botão dentro do script.lua e colocar um texto com quebra de linha, funciona normal. Porém se eu obter esse mesmo texto com quebra de linha do arquivo.xml, ele carrega \n no lugar da quebra de linha, como se o \n deixasse de funcionar. buttons[i][k] = guiCreateButton (250, 50*(k-1)-30,
  13. Eu to editando meu painel de criar base e to antes nao tinha como alterar a senha da base pelo painel e acabei criando 1 so que que estou com problema na hora de salvar no xml no caso substituir a senha que ja conta no xml por uma nova veja se esta correto e por favor me ajuda a resolver addEvent("editGate",true) addEventHandler("editGate",getRootElement(),function(baseName,gateName,pass) local xml = xmlLoadFile("Bases.xml") for i,node in pairs(xmlNodeGetChildren(xml))do if xmlNodeGetName(node) == baseName then local gateInfo = xmlFindChild(node,"baseName") lo
  14. i want save grid list rows to xml, and load from xml.. but how to make this?
  15. Hi .. I've made a vending machine mod and I'm trying to make it shows up on marker in XML design, I already took an example of what I need, the bank_system has one what I did is copying the xml server file in that mod and edit it to make it right, well its confusing to me because I'm new at this, I pasted the whole code just in case, The problem is might be in Xmlserver.lua, exactly right here: function bankInit( ) local xml_root = xmlLoadFile( "bar.locations.xml" ) local banks = 0 while( xmlFindChild( xml_root, "bank", banks ) ) do local markerSize
  16. eu estou fazendo um sistema de salvamento XML so que preciso de ajuda, ele nao esta setando o level e o EXP quando do o comando ou quando eu logo podem me ajuda? Nunca mexi com o XML OPS: o "XLevel" ja esta com os itens salvo nele, so falta setar function LoadLevels() xml = xmlLoadFile("XLevel.xml") for i,node in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetAttribute(node,"Account") == getAccountName(getPlayerAccount(source)) then setElementData(source,"level",tonumber(xmlNodeGetAttribute(node,"LV"))) setElementData(source,"experience",tonumber(xmlNodeGetAttribute(
  17. Ahmed Ly

    help [xml]

    function getfolderNameAndScripts (folder) tables = {} local xml = xmlLoadFile("meta.xml") local Nodes = xmlNodeGetChildren(xml) for i,node in ipairs(Nodes) do if xmlNodeGetName(node) == "script" then local script_Name = xmlNodeGetAttribute(node, "src") table.insert(tables,script_Name) output = "resources\\"..folder.."\\"..tables[#tables].. "" end end xmlUnloadFile(xml) return output end outputServerLog(""..getfolderNameAndScripts("acl").."") --[[ the code it's working good but its output last file .lua in meta.xml resources/acl/clinet.lua doesn't output in server log re
  18. He echarías una mano te lo ruego? Me solucionarías estas líneas?... function debugJump() if PedControlState("jump") then Aqui el error ---- attempt to call global ´PedControlState´ (a nil value) setElementData(getLocalPlayer(), "jumping", true) setTimer(debugJump2, 650, 1) end end setTimer(debugJump, 100, 0) function debugJump2() setElementData(getLocalPlayer(), "jumping", false) end Y luego esta parece ser el mismo error que el de arriba: function debugShooting() if PedControlState("fire") then -- Error--
  19. So, heres my table local twonodes = {"login", "rpteszt"} local thirdnodes = {[twonodes[1]] = {"username","password", "rememberMe"}, [twonodes[2]]={"rpteszt"}} local values = {thirdnodes[twonodes[1]]={"false"}} Seems good, right?Yeah, for u,but not for Lua... ERROR: Loading script failed: loginpanel/loginpanelC:112: '}' expected near '=''
  20. Hello, I would like to get the last updates by an xml file and write it in a memo. But ; for this I need to pass lines. My xml : <settings> <news>something \n other</news> </settings> server : -- Server : function showNews(source) local settings = xmlLoadFile(":script/settings.xml") triggerClientEvent(source,"shownews",source,xmlNodeGetValue(xmlFindChild(settings, "news", 0))) end -- I made a bind a bind to this function somewhere else in my script and it work so, it's not the problem client : -- Client : function showNews(news_) if
  21. client: local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function noBinds() guiSetInputMode("no_binds_when_editing") end addEventHandler("onClientResourceStart", root, noBinds) function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"Magyar Play Szerver - Loginpanel by turbesz",true) guiSetSize(windowLogin, 270, 175, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Felh.név:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAli
  22. addEventHandler ( "onClientGUIDoubleClick", root, function ( ) local Selected = guiGridListGetSelectedItem ( GUIEditor.gridlist[7] ) local GetText = guiGridListGetItemText( GUIEditor.gridlist[7], Selected, 2 ) if source == GUIEditor.gridlist[7] then for Index, Node in ipairs ( xmlNodeGetChildren ( xml2 ) ) do if GetText == xmlNodeGetAttribute ( Node, "name" ) then guiGridListClear ( GUIEditor.gridlist[7] ) for Index, Node in ipairs ( xmlNodeGetChildren ( Node ) ) do local mk=Node or xmlNodeGetChildren ( Node ) local Row = guiGridListAddRow ( GUIEditor.gridlis
  23. سلام عليكم ورحمة الله وبركاته شباب سؤال فقط كيف اسوي جريد لست فيها رو الرو هذا جبته من xml زي الفري روم مثلا
  24. Hi there, I am trying to implement a error system, and i am stuck on the problem, that xmlCreateChild overwrites the old node and so i cant get an error-list. Here is the Code: [lua]--------------------------------------------------Fehler in XML speichern-------------------------------------------------- function registerError( errorType, errorDescription ) local xmlErrorLog = xmlLoadFile( "errorLog.xml" ) if xmlErrorLog == false then xmlErrorLog = xmlCreateFile( "errorLog.xml", "errors" ) end local time = getRealTime( ) -- Die Zeit des Fehlers
  25. Hello guys! I have a weir issu (or just i don't see what is the problem) So i wanted to write a script which saves a table. But if i call my saveTable method it doesn't load the xml file just create one then overwrite it. And i don't have a clue why... function open( path, version ) --outputDebugString("XML: open called", 1) outputDebugString(rootNode, 1) rootNode = xmlLoadFile(path) outputDebugString(rootNode, 1) if (not rootNode) then outputDebugString(path) rootNode = xmlCreateFile(path, "root") xmlNodeSetAttribute(rootNode, "version",
  • Create New...