Feche1320 Posted May 24, 2011 Share Posted May 24, 2011 Any way of doing this? It doesn't change it at all.. local currentmapres = exports.mapmanager:getRunningGamemodeMap() file = xmlLoadFile(":" ..getResourceName(currentmapres).. "/meta.xml") if file ~= false then local oldmapname = xmlFindChild(file, "info", 0) if oldmapname ~= false then local newname = table.concat({...}, " ") xmlNodeSetAttribute(oldmapname, "name", newname) outputChatBox("* Map name is now '" ..newname.. "'.", g_Root, 46, 154, 254) triggerClientEvent("updateMapName", g_Root, newname) setResourceInfo(currentmapres, "name", newname) xmlSaveFile(file) xmlUnloadFile(file) end end end Link to comment
Feche1320 Posted May 26, 2011 Author Share Posted May 26, 2011 is ... defined? Yes, it was working fine without the resource in a .zip, yesterday I compressed each map in a .zip file to save some space, but now I can't rename the map.. meta.xml doesn't chage. 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