Jump to content

is possible ??


JuniorMelo

Recommended Posts

Hello

I wonder if it is possible to change the map only in dimension 1

function setNextRandomMap() 
    local manager = exports.mapmanager 
    local gameMode = manager:getRunningGamemode() 
    local mapTable = {} 
     
    for index, map in ipairs(manager:getMapsCompatibleWithGamemode(gameMode)) do 
        if (map) then 
            table.insert(mapTable, map) 
            outputDebugString("Map found: " .. getResourceName(map)) 
        end 
    end 
             
    if (#mapTable >= 0) then 
        local randomMap = math.random(1, #mapTable) 
        manager:changeGamemodeMap(mapTable[randomMap], gameMode) 
        mapTable = {} 
    else 
        outputDebugString("Error loading new map. No map was found for this gamemode.") 
    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...