mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
mapmanager: better randomized roundEnd map rotation
This commit is contained in:
@@ -158,7 +158,16 @@ local function handleRoundEnd()
|
||||
end
|
||||
end
|
||||
|
||||
if #possibleMaps > 0 then
|
||||
if #possibleMaps > 1 then
|
||||
local mapname = currentMap
|
||||
|
||||
while mapname == currentMap do
|
||||
local rnd = math.random(#possibleMaps)
|
||||
mapname = possibleMaps[rnd]
|
||||
end
|
||||
|
||||
changeMap(mapname)
|
||||
elseif #possibleMaps > 0 then
|
||||
local rnd = math.random(#possibleMaps)
|
||||
changeMap(possibleMaps[rnd])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user