Need help adding more maps to Fretta's vote map system! {Prop Hunt}

So i made my own dedicated server and got it to work just fine. I downloaded the ph_ maps and they load once i start up srcds but then it gets to the fretta voting system and i can only choose 6 cs_ maps. I could care less about the de_maps for now. I can’t seem to find a lua or cfg file to edit these maps in the list.

Also, since the built in fretta didn’t even work at the end of the 10th round in prop hunt, i looked online and got an updated fretta one:
http://steamcommunity.com/id/dysthymia7/screenshot/579002701483329415
Thanks for the help!

Do you have a mapvote folder or something similar in garrysmod/cfg?

So under add ons theres Gmod-mapvote-master\lau\autorun\mapvote.lua

And
Gmod-mapvote-master\lau\mapvote\cl_mapvote.lua
Gmod-mapvote-master\lau\mapvote\cl_mapvote.lua

I did a CNTRL-F to find any text that started with “cs” and “cs_” and nothing. I dont know what to edit. I was hoping i would find map names with the prefix “cs_” so i can put a comma and put the other maps on there as well but nothing.

[editline]21st October 2013[/editline]

heres the thread on the updated fretta. I look for anyone asking for prophunt but nothing. I even asked just now. http://forum.facepunch.com/showthread.php?t=1268353

Paste the code of the file.

Sorry i dont know how to post codes on threads but here it is:

(for the “autorun\mapvote.lua”)
MapVote = {}
MapVote.Config = {}

– CONFIG (sort of)
MapVote.Config = {
MapLimit = 24,
TimeLimit = 28,
AllowCurrentMap = true,
}
– CONFIG

function MapVote.HasExtraVotePower(ply)
– Example that gives admins more voting power
if ply:IsAdmin() then
return true
end

return false

end

MapVote.CurrentMaps = {}
MapVote.Votes = {}

MapVote.Allow = false

MapVote.UPDATE_VOTE = 1
MapVote.UPDATE_WIN = 3

if SERVER then
AddCSLuaFile()
AddCSLuaFile(“mapvote/cl_mapvote.lua”)

include("mapvote/sv_mapvote.lua")

else
include(“mapvote/cl_mapvote.lua”)
end

(For the “mapvote\cl_mapvote.lua”)

surface.CreateFont(“RAM_VoteFont”, {
font = “Trebuchet MS”,
size = 19,
weight = 700,
antialias = true,
shadow = true
})

surface.CreateFont(“RAM_VoteFontCountdown”, {
font = “Tahoma”,
size = 32,
weight = 700,
antialias = true,
shadow = true
})

surface.CreateFont(“RAM_VoteSysButton”,
{ font = “Marlett”,
size = 13,
weight = 0,
symbol = true,
})

MapVote.EndTime = 0
MapVote.Panel = false

net.Receive(“RAM_MapVoteStart”, function()
MapVote.CurrentMaps = {}
MapVote.Allow = true
MapVote.Votes = {}

local amt = net.ReadUInt(32)

for i = 1, amt do
    local map = net.ReadString()
    
    MapVote.CurrentMaps[#MapVote.CurrentMaps + 1] = map
end

MapVote.EndTime = CurTime() + net.ReadUInt(32)

if(IsValid(MapVote.Panel)) then
    MapVote.Panel:Remove()
end

MapVote.Panel = vgui.Create("RAM_VoteScreen")
MapVote.Panel:SetMaps(MapVote.CurrentMaps)

end)

net.Receive(“RAM_MapVoteUpdate”, function()
local update_type = net.ReadUInt(3)

if(update_type == MapVote.UPDATE_VOTE) then
    local ply = net.ReadEntity()
    
    if(IsValid(ply)) then
        local map_id = net.ReadUInt(32)
        MapVote.Votes[ply:SteamID()] = map_id
    
        if(IsValid(MapVote.Panel)) then
            MapVote.Panel:AddVoter(ply)
        end
    end
elseif(update_type == MapVote.UPDATE_WIN) then      
    if(IsValid(MapVote.Panel)) then
        MapVote.Panel:Flash(net.ReadUInt(32))
    end
end

end)

net.Receive(“RAM_MapVoteCancel”, function()
if IsValid(MapVote.Panel) then
MapVote.Panel:Remove()
end
end)

local PANEL = {}

function PANEL:Init()
self:ParentToHUD()

self.Canvas = vgui.Create("Panel", self)
self.Canvas:MakePopup()
self.Canvas:SetKeyboardInputEnabled(false)

self.countDown = vgui.Create("DLabel", self.Canvas)
self.countDown:SetTextColor(color_white)
self.countDown:SetFont("RAM_VoteFontCountdown")
self.countDown:SetText("")
self.countDown:SetPos(0, 14)

self.mapList = vgui.Create("DPanelList", self.Canvas)
self.mapList:SetDrawBackground(false)
self.mapList:SetSpacing(4)
self.mapList:SetPadding(4)
self.mapList:EnableHorizontal(true)
self.mapList:EnableVerticalScrollbar()

self.closeButton = vgui.Create("DButton", self.Canvas)
self.closeButton:SetText("")

self.closeButton.Paint = function(panel, w, h)
    derma.SkinHook("Paint", "WindowCloseButton", panel, w, h)
end

self.closeButton.DoClick = function()
    print("HI")
    self:SetVisible(false)
end

self.maximButton = vgui.Create("DButton", self.Canvas)
self.maximButton:SetText("")
self.maximButton:SetDisabled(true)

self.maximButton.Paint = function(panel, w, h)
    derma.SkinHook("Paint", "WindowMaximizeButton", panel, w, h)
end

self.minimButton = vgui.Create("DButton", self.Canvas)
self.minimButton:SetText("")
self.minimButton:SetDisabled(true)

self.minimButton.Paint = function(panel, w, h)
    derma.SkinHook("Paint", "WindowMinimizeButton", panel, w, h)
end

self.Voters = {}

end

function PANEL:PerformLayout()
local cx, cy = chat.GetChatBoxPos()

self:SetPos(0, 0)
self:SetSize(ScrW(), ScrH())

local extra = math.Clamp(300, 0, ScrW() - 640)
self.Canvas:StretchToParent(0, 0, 0, 0)
self.Canvas:SetWide(640 + extra)
self.Canvas:SetTall(cy -60)
self.Canvas:SetPos(0, 0)
self.Canvas:CenterHorizontal()
self.Canvas:SetZPos(0)

self.mapList:StretchToParent(0, 90, 0, 0)

local buttonPos = 640 + extra - 31 * 3

self.closeButton:SetPos(buttonPos - 31 * 0, 4)
self.closeButton:SetSize(31, 31)
self.closeButton:SetVisible(true)

self.maximButton:SetPos(buttonPos - 31 * 1, 4)
self.maximButton:SetSize(31, 31)
self.maximButton:SetVisible(true)

self.minimButton:SetPos(buttonPos - 31 * 2, 4)
self.minimButton:SetSize(31, 31)
self.minimButton:SetVisible(true)

end

local heart_mat = Material(“icon16/heart.png”)
local star_mat = Material(“icon16/star.png”)
local shield_mat = Material(“icon16/shield.png”)

function PANEL:AddVoter(voter)
for k, v in pairs(self.Voters) do
if(v.Player and v.Player == voter) then
return false
end
end

local icon_container = vgui.Create("Panel", self.mapList:GetCanvas())
local icon = vgui.Create("AvatarImage", icon_container)
icon:SetSize(16, 16)
icon:SetZPos(1000)
icon:SetTooltip(voter:Name())
icon_container.Player = voter
icon_container:SetTooltip(voter:Name())
icon:SetPlayer(voter, 16)

if MapVote.HasExtraVotePower(voter) then
    icon_container:SetSize(40, 20)
    icon:SetPos(21, 2)
    icon_container.img = star_mat
else
    icon_container:SetSize(20, 20)
    icon:SetPos(2, 2)
end

icon_container.Paint = function(s, w, h)
    draw.RoundedBox(4, 0, 0, w, h, Color(255, 0, 0, 80))
    
    if(icon_container.img) then
        surface.SetMaterial(icon_container.img)
        surface.SetDrawColor(Color(255, 255, 255))
        surface.DrawTexturedRect(2, 2, 16, 16)
    end
end

table.insert(self.Voters, icon_container)

end

function PANEL:Think()
for k, v in pairs(self.mapList:GetItems()) do
v.NumVotes = 0
end

for k, v in pairs(self.Voters) do
    if(not IsValid(v.Player)) then
        v:Remove()
    else
        if(not MapVote.Votes[v.Player:SteamID()]) then
            v:Remove()
        else
            local bar = self:GetMapButton(MapVote.Votes[v.Player:SteamID()])
            
            if(MapVote.HasExtraVotePower(v.Player)) then
                bar.NumVotes = bar.NumVotes + 2
            else
                bar.NumVotes = bar.NumVotes + 1
            end
            
            if(IsValid(bar)) then
                local CurrentPos = Vector(v.x, v.y, 0)
                local NewPos = Vector((bar.x + bar:GetWide()) - 21 * bar.NumVotes - 2, bar.y + (bar:GetTall() * 0.5 - 10), 0)
                
                if(not v.CurPos or v.CurPos ~= NewPos) then
                    v:MoveTo(NewPos.x, NewPos.y, 0.3)
                    v.CurPos = NewPos
                end
            end
        end
    end
    
end

local timeLeft = math.Round(math.Clamp(MapVote.EndTime - CurTime(), 0, math.huge))

self.countDown:SetText(tostring(timeLeft or 0).." seconds")
self.countDown:SizeToContents()
self.countDown:CenterHorizontal()

end

function PANEL:SetMaps(maps)
self.mapList:Clear()

for k, v in RandomPairs(maps) do
    local button = vgui.Create("DButton", self.mapList)
    button.ID = k
    button:SetText(v)
    
    button.DoClick = function()
        net.Start("RAM_MapVoteUpdate")
            net.WriteUInt(MapVote.UPDATE_VOTE, 3)
            net.WriteUInt(button.ID, 32)
        net.SendToServer()
    end
    
    do
        local Paint = button.Paint
        button.Paint = function(s, w, h)
            local col = Color(255, 255, 255, 10)
            
            if(button.bgColor) then
                col = button.bgColor
            end
            
            draw.RoundedBox(4, 0, 0, w, h, col)
            Paint(s, w, h)
        end
    end
    
    button:SetTextColor(color_white)
    button:SetContentAlignment(4)
    button:SetTextInset(8, 0)
    button:SetFont("RAM_VoteFont")
    
    local extra = math.Clamp(300, 0, ScrW() - 640)
    
    button:SetDrawBackground(false)
    button:SetTall(24)
    button:SetWide(285 + (extra / 2))
    button.NumVotes = 0
    
    self.mapList:AddItem(button)
end

end

function PANEL:GetMapButton(id)
for k, v in pairs(self.mapList:GetItems()) do
if(v.ID == id) then return v end
end

return false

end

function PANEL:Paint()
–Derma_DrawBackgroundBlur(self)

local CenterY = ScrH() / 2
local CenterX = ScrW() / 2

surface.SetDrawColor(0, 0, 0, 200)
surface.DrawRect(0, 0, ScrW(), ScrH())

end

function PANEL:Flash(id)
self:SetVisible(true)

local bar = self:GetMapButton(id)

if(IsValid(bar)) then
    timer.Simple( 0.0, function() bar.bgColor = Color( 0, 255, 255 ) surface.PlaySound( "hl1/fvox/blip.wav" ) end )
    timer.Simple( 0.2, function() bar.bgColor = nil end )
    timer.Simple( 0.4, function() bar.bgColor = Color( 0, 255, 255 ) surface.PlaySound( "hl1/fvox/blip.wav" ) end )
    timer.Simple( 0.6, function() bar.bgColor = nil end )
    timer.Simple( 0.8, function() bar.bgColor = Color( 0, 255, 255 ) surface.PlaySound( "hl1/fvox/blip.wav" ) end )
    timer.Simple( 1.0, function() bar.bgColor = Color( 100, 100, 100 ) end )
end

end

derma.DefineControl(“RAM_VoteScreen”, “”, PANEL, “DPanel”)

(For the “mapvote\sv_mapvote.lua”)

util.AddNetworkString(“RAM_MapVoteStart”)
util.AddNetworkString(“RAM_MapVoteUpdate”)
util.AddNetworkString(“RAM_MapVoteCancel”)

MapVote.Continued = false

net.Receive(“RAM_MapVoteUpdate”, function(len, ply)
if(MapVote.Allow) then
if(IsValid(ply)) then
local update_type = net.ReadUInt(3)

        if(update_type == MapVote.UPDATE_VOTE) then
            local map_id = net.ReadUInt(32)
            
            if(MapVote.CurrentMaps[map_id]) then
                MapVote.Votes[ply:SteamID()] = map_id
                
                net.Start("RAM_MapVoteUpdate")
                    net.WriteUInt(MapVote.UPDATE_VOTE, 3)
                    net.WriteEntity(ply)
                    net.WriteUInt(map_id, 32)
                net.Broadcast()
            end
        end
    end
end

end)

function MapVote.Start(Length, CurrentMap, Limit, Prefix)
current = current or MapVote.Config.AllowCurrentMap or false
length = length or MapVote.Config.TimeLimit or 28
limit = limit or MapVote.Config.MapLimit or 24

local is_expression = false

if not prefix then
    local info = file.Read(GAMEMODE.Folder.."/"..GAMEMODE.FolderName..".txt", "GAME")

    if(info) then
        local info = util.KeyValuesToTable(info)
        prefix = info.maps
    else
        error("MapVote Prefix can not be loaded from gamemode")
    end

    is_expression = true
else
    if prefix and type(prefix) ~= "table" then
        prefix = {prefix}
    end
end

local maps = file.Find("maps/*.bsp", "GAME")

local vote_maps = {}

local amt = 0

for k, map in RandomPairs(maps) do
    local mapstr = map:sub(1, -5):lower()
    if(not current and game.GetMap():lower()..".bsp" == map) then continue end

    if is_expression then
        if(string.find(map, prefix)) then -- This might work (from gamemode.txt)
            vote_maps[#vote_maps + 1] = map:sub(1, -5)
            amt = amt + 1
        end
    else
        for k, v in pairs(prefix) do
            if string.find(map, "^"..v) then
                vote_maps[#vote_maps + 1] = map:sub(1, -5)
                amt = amt + 1
                break
            end
        end
    end
    
    if(limit and amt >= limit) then break end
end

net.Start("RAM_MapVoteStart")
    net.WriteUInt(#vote_maps, 32)
    
    for i = 1, #vote_maps do
        net.WriteString(vote_maps*)
    end
    
    net.WriteUInt(length, 32)
net.Broadcast()

MapVote.Allow = true
MapVote.CurrentMaps = vote_maps
MapVote.Votes = {}

timer.Create("RAM_MapVote", length, 1, function()
    MapVote.Allow = false
    local map_results = {}
    
    for k, v in pairs(MapVote.Votes) do
        if(not map_results[v]) then
            map_results[v] = 0
        end
        
        for k2, v2 in pairs(player.GetAll()) do
            if(v2:SteamID() == k) then
                if(MapVote.HasExtraVotePower(v2)) then
                    map_results[v] = map_results[v] + 2
                else
                    map_results[v] = map_results[v] + 1
                end
            end
        end
        
    end
    
    local winner = table.GetWinningKey(map_results) or 1
    
    net.Start("RAM_MapVoteUpdate")
        net.WriteUInt(MapVote.UPDATE_WIN, 3)
        
        net.WriteUInt(winner, 32)
    net.Broadcast()
    
    local map = MapVote.CurrentMaps[winner]

    
    timer.Simple(4, function()
        hook.Run("MapVoteChange", map)
        RunConsoleCommand("changelevel", map)
    end)
end)

end

function MapVote.Cancel()
if MapVote.Allow then
MapVote.Allow = false

    net.Start("RAM_MapVoteCancel")
    net.Broadcast()

    timer.Destroy("RAM_MapVote")
end

end

Once again, thanks for all the help!!!