JeViCo Posted February 2, 2018 Share Posted February 2, 2018 Hello guys, i have a problem. --------LOADING POSITION if not fileExists("settings.xml") then local x, y, z = getElementPosition(player) local settingsXML = xmlCreateFile("settings.xml", "settings") xmlNodeSetAttribute(xmlCreateChild(settingsXML, "positionX"), "x", "false") xmlNodeSetAttribute(xmlCreateChild(settingsXML, "positionY"), "y", "false") xmlSaveFile(settingsXML) xmlUnloadFile(settingsXML) chatbox.posX = screenX/2-200 chatbox.posY = 10 + chatbox.tabHeight else local settingsXML = xmlLoadFile("settings.xml") local positionX = xmlFindChild(settingsXML, "positionX", 0) if positionX then local x = xmlNodeGetAttribute(positionX, "x") chatbox.posX = tonumber(x) or 10 end local positionY = xmlFindChild(settingsXML, "positionY", 0) if positionY then local y = xmlNodeGetAttribute(positionY, "y") chatbox.posY = tonumber(y) or 10 + chatbox.tabHeight end xmlUnloadFile(settingsXML) end this part of dx chat doesn't work. How can i fix it? Should i write something in meta.xml to make it work? Link to comment
JeViCo Posted February 3, 2018 Author Share Posted February 3, 2018 14 hours ago, NeXuS™ said: Any errors? debugscript + logs - nothing Link to comment
#RooTs Posted February 4, 2018 Share Posted February 4, 2018 (edited) problem? Edited February 4, 2018 by #RooTs Link to comment
JeViCo Posted February 7, 2018 Author Share Posted February 7, 2018 never mind. Script save settings somewhere. Settings.xml doesn't appear in script folder, however it has admin acl rights Link to comment
URBAN Posted February 7, 2018 Share Posted February 7, 2018 If its client sided check mta resources folder 1 Link to comment
Maes Posted February 7, 2018 Share Posted February 7, 2018 The file, which is created by script, always in client-side folders. In other words, the script use this file to save player datas and doing this with created files in client-side folders. If file doesn't exist then new one is created. In this lines you did this. And you must look downloaded client scripts. (...MTA/mods/deathmatch/resources and find your script.) 1 Link to comment
JeViCo Posted May 18, 2018 Author Share Posted May 18, 2018 On 07.02.2018 at 14:25, URBAN said: If its client sided check mta resources folder On 07.02.2018 at 16:42, Maes said: The file, which is created by script, always in client-side folders. In other words, the script use this file to save player datas and doing this with created files in client-side folders. If file doesn't exist then new one is created. In this lines you did this. And you must look downloaded client scripts. (...MTA/mods/deathmatch/resources and find your script.) yeah, that was so stupid Thank you both Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now