Mickoi Posted January 15, 2021 Posted January 15, 2021 Hi, i came with question about xml files? Can i set xml file only to read for client? I mean in script i'm creating xml file and i dont want to situation that client is editing xml file and script is warning me in ds3, some ideas? I made a function which renew xml file but it isnt efficient so
Moderators IIYAMA Posted January 15, 2021 Moderators Posted January 15, 2021 (edited) 25 minutes ago, Mickoi said: Can i set xml file only to read for client? You can read xml from a string. So you got your xml tree scoped by your own script. https://wiki.multitheftauto.com/wiki/XmlLoadString But keep in mind that there is no MTA function yet to convert it back to a string. (unless you make one yourself) Edited January 15, 2021 by IIYAMA 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Mickoi Posted January 16, 2021 Author Posted January 16, 2021 12 hours ago, IIYAMA said: You can read xml from a string. So you got your xml tree scoped by your own script. https://wiki.multitheftauto.com/wiki/XmlLoadString But keep in mind that there is no MTA function yet to convert it back to a string. (unless you make one yourself) Thanks for help but finally i made a function which renew xml from file always when player is starting client resource, thanks one more time. /to close 1
Recommended Posts