Jump to content

remove respawn map "DM"


Recommended Posts

i want to remove respawn from dm maps

i use code solidSnak14 xD

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...