~!#abdullah Posted May 8, 2014 Share Posted May 8, 2014 i want to remove respawn from dm maps i use code solidSnak14 it work when the map unzip ( if i upload it file not .zip ) but the maps .zip not work the code Server function fixRespawnMaps( ) local count = 0 for _, v in pairs( exports.mapmanager:getMapsCompatibleWithGamemode( exports.mapmanager:getRunningGamemode( ) ) ) do local main = xmlLoadFile( ":"..getResourceName( v ).."/meta.xml" ) if main then settings = xmlFindChild( main,"settings",0 ) local node = xmlFindChild( settings, "setting", 13 ) local i = 1 while node do if (xmlNodeGetAttribute( node, "value" ) ~= "none") then xmlNodeSetAttribute( node,"value","none" ) xmlSaveFile(main) end node = xmlFindChild( v, "setting", i ) i = i + 1 end count = count + 1 xmlUnloadFile(main) end end return count end addCommandHandler( "fixAllMaps", function( player ) if hasObjectPermissionTo( player,"function.setServerPassword",true ) then outputChatBox( "(MAPFIX) You have fixed #FFFFFF"..tostring( fixRespawnMaps( ) ).."#FF6464 maps!",player,255,100,100,true ) else outputChatBox( "(MAPFIX) You don't have the required rights to perform this action!",player,255,100,100 ) end end ) 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