• Giving Donators Two Vote Voices, But How?
    2 replies, posted
Hello Community, my server is using "Fretta Like Map Vote" Mapvote. Now I would like to give my donators the right that their vote counts two times. How can I do this. This is my "mapvote.lua" [code]MapVote = {} MapVote.Config = {} --Default Config MapVoteConfigDefault = { MapLimit = 24, TimeLimit = 28, AllowCurrentMap = false, EnableCooldown = true, MapsBeforeRevote = 3, RTVPlayerCount = 3, MapPrefixes = {"ttt_"} } --Default Config hook.Add( "Initialize", "MapVoteConfigSetup", function() if not file.Exists( "mapvote", "DATA") then file.CreateDir( "mapvote" ) end if not file.Exists( "mapvote/config.txt", "DATA" ) then file.Write( "mapvote/config.txt", util.TableToJSON( MapVoteConfigDefault ) ) end end ) 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") include("mapvote/rtv.lua") else include("mapvote/cl_mapvote.lua") end [/code] Also I have a "ttt_mapvote.lua" in lua/autorun/server. [code]hook.Add("Initialize", "TTT MapVote", function() function CheckForMapSwitch() -- Check for mapswitchsv local rounds_left = math.max(0, GetGlobalInt("ttt_rounds_left", 6) - 1) SetGlobalInt("ttt_rounds_left", rounds_left) local time_left = math.max(0, (GetConVar("ttt_time_limit_minutes"):GetInt() * 60) - CurTime()) if rounds_left <= 0 or time_left <= 0 then timer.Stop("end2prep") MapVote.Start(25, false, 24, "ttt_") -- Modify this line to change mapvote settings end end end) function MapVote.HasExtraVotePower(ply) -- Example that gives admins more voting power if ply:IsAdmin() then return true end return false end[/code] From these files, admins should already have this right, but they don't. What should I do? Greetings Tezou
Remove ttt_mapvote.lua from autorun, you don't need it there. As far as I know, the addon requires that you just edit the mapvote.lua instead. Use: [code]if ply:IsUserGroup("insert_donator_rank") then[/code] Replace 'insert_donator_rank' with whatever your rank for donator is.
The thing is, the addon doesn't work with this second lua file. I contacted the coder of the fretta like map vote addon and he sent me it.
Sorry, you need to Log In to post a reply to this thread.