From c020b9437ddc786d5a17149db0e5589e4ea76601 Mon Sep 17 00:00:00 2001 From: edshot99 Date: Fri, 5 Apr 2024 07:37:53 -0500 Subject: [PATCH] fix map not changing when the map file name uses spaces --- lua/ulx/modules/votemap.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/ulx/modules/votemap.lua b/lua/ulx/modules/votemap.lua index 636da65..46a653c 100644 --- a/lua/ulx/modules/votemap.lua +++ b/lua/ulx/modules/votemap.lua @@ -158,7 +158,7 @@ function ulx.votemap( calling_ply, map ) if vetotime < 1 then ULib.tsay( _, "Vote for map " .. ulx.votemaps[ mapid ] .. " successful! Changing levels now.", true ) -- TODO, color? ulx.logString( "Votemap for " .. ulx.votemaps[ mapid ] .. " won." ) - game.ConsoleCommand( "changelevel " .. ulx.votemaps[ mapid ] .. "\n" ) + game.ConsoleCommand( "changelevel \"" .. ulx.votemaps[ mapid ] .. "\"\n" ) else ULib.tsay( _, "Vote for map " .. ulx.votemaps[ mapid ] .. " successful! Now pending admin approval. (" .. vetotime .. " seconds)", true ) -- TODO, color? for _, player in ipairs( admins ) do @@ -173,7 +173,7 @@ function ulx.votemap( calling_ply, map ) ulx.csay(calling_ply, "====== MAP CHANGE IN: " .. vetotime2 .. " SECOND(S) ======") vetotime2 = vetotime2 - 1 end ) - timer.Create( "ULXVotemap", vetotime, 1, function() game.ConsoleCommand( "changelevel " .. ulx.votemaps[ mapid ] .. "\n" ) end ) + timer.Create( "ULXVotemap", vetotime, 1, function() game.ConsoleCommand( "changelevel \"" .. ulx.votemaps[ mapid ] .. "\"\n" ) end ) end end end