• Simple Map Voting Addon
    235 replies, posted
[QUOTE=Willox;40587784]MapVote.Start(15, false, 24, {"ttt_", "dm_", "cs_", "de_", "clue"})[/QUOTE] Sorry to be a pain but i couldn't find were: MapVote.Start(15, false, 24, "ttt_") is so i can change it to MapVote.Start(15, false, 24, {"ttt_", "dm_", "cs_", "de_", "clue"}) I have looked through all 3 files for the map voting system but couldn't find it. Sorry if this is a stupid question
That is the code you have to add to your gamemode of your choice
I added it to the RTV Addon and it works, but it doesn't work after, 6 rounds, Im using TTT were should i copy MapVote.Start(15, false, 24, {"ttt_", "dm_", "cs_", "de_", "clue"}) to? Thanks
[QUOTE=adnan;41049344]I added it to the RTV Addon and it works, but it doesn't work after, 6 rounds, Im using TTT were should i copy MapVote.Start(15, false, 24, {"ttt_", "dm_", "cs_", "de_", "clue"}) to? Thanks[/QUOTE] [url]http://facepunch.com/showthread.php?t=1268353&p=40534959&viewfull=1#post40534959[/url]
[QUOTE=adnan;41049344]I added it to the RTV Addon and it works, but it doesn't work after, 6 rounds, Im using TTT were should i copy MapVote.Start(15, false, 24, {"ttt_", "dm_", "cs_", "de_", "clue"}) to? Thanks[/QUOTE] :L Sir, may I suggest you try my version? (Not trying to butt in Willox, but he doesn't seem to have much of a clue). [url]https://github.com/tyrantelf/gmod-mapvote/archive/master.zip[/url] This will work without any edits/placement of MapVote.Start. If you want to make it use all those map prefixes, after the first run of your server with this isntalled, go to garrysmod/data/mapvote/config.txt and make it this: [CODE]{"RTVPlayerCount":3,"MapLimit":24,"TimeLimit":28,"AllowCurrentMap":false,"MapPrefixes":{"ttt_", "dm_", "cs_", "de_", "clue"},"MapsBeforeRevote":3,"EnableCooldown":true}[/CODE]
[QUOTE=Willox;41049883][url]http://facepunch.com/showthread.php?t=1268353&p=40534959&viewfull=1#post40534959[/url][/QUOTE] ohh LOOL thanks will im so stupid ty <3 :)
[QUOTE=tyrantelf;41051836] [CODE]{"RTVPlayerCount":3,"MapLimit":24,"TimeLimit":28,"AllowCurrentMap":false,"MapPrefixes":{"ttt_", "dm_", "cs_", "de_", "clue"},"MapsBeforeRevote":3,"EnableCooldown":true}[/CODE][/QUOTE] I noticed the 'clue' bit at the end of your code, does that allow me to have a specific map without having all of them with the same prefix coming up? For instance I have a map called gm_bob but if I enable gm_ in the config file it will put all the other gm_ maps up but I just want gm_bob. Sorry for my poor choice of wording.
[QUOTE=smithy285;41055345]I noticed the 'clue' bit at the end of your code, does that allow me to have a specific map without having all of them with the same prefix coming up? For instance I have a map called gm_bob but if I enable gm_ in the config file it will put all the other gm_ maps up but I just want gm_bob. Sorry for my poor choice of wording.[/QUOTE] Yep
I am now getting this error. [lua] Lua Error: addons/gmod-mapvote-master/lua/mapvote/sv_mapvote.lua:59: attempt to index field 'Config' (a nil value) [/lua] Here is my config code, the only thing I changed. [lua] {"RTVPlayerCount":3,"MapLimit":20,"TimeLimit":25,"AllowCurrentMap":false,"MapPrefixes":{"1":"ttt_","mw2_"},"MapsBeforeRevote":3,"EnableCooldown":true} [/lua]
Think it due to the missing numbers before each map type. As in mine I have it like this. [code]{"MapPrefixes":{"1":"ttt_","2":"zm_","3":"cs_","4":"de_","5":"dm_","6":"clue"},"MapLimit":24,"TimeLimit":25,"AllowCurrentMap":false,"MapsBeforeRevote":10,"EnableCooldown":true}[/code]
[QUOTE=NaRyan;41060842]Think it due to the missing numbers before each map type. As in mine I have it like this. [code]{"MapPrefixes":{"1":"ttt_","2":"zm_","3":"cs_","4":"de_","5":"dm_","6":"clue"},"MapLimit":24,"TimeLimit":25,"AllowCurrentMap":false,"MapsBeforeRevote":10,"EnableCooldown":true}[/code][/QUOTE] Yeah, that would be it. I was in a hurry posting my reply and forgot the numbers.. I'm looking into a better (easier to read/edit) way to make the configuration file ATM. It'll be in the next update (of my fork of the addon).
[QUOTE=tyrantelf;41051836]:L Sir, may I suggest you try my version? (Not trying to butt in Willox, but he doesn't seem to have much of a clue). [url]https://github.com/tyrantelf/gmod-mapvote/archive/master.zip[/url] This will work without any edits/placement of MapVote.Start. If you want to make it use all those map prefixes, after the first run of your server with this isntalled, go to garrysmod/data/mapvote/config.txt and make it this: [CODE]{"RTVPlayerCount":3,"MapLimit":24,"TimeLimit":28,"AllowCurrentMap":false,"MapPrefixes":{"ttt_", "dm_", "cs_", "de_", "clue"},"MapsBeforeRevote":3,"EnableCooldown":true}[/CODE][/QUOTE] Thank you for sharing that cooldown lua code!
Actually nevermind, is there a code so I can set a cool down for the mapvote ? I mean, the last map played cant be voted for the next 3 map votes..
not bad thanks
[QUOTE=hellguy;41146704]Actually nevermind, is there a code so I can set a cool down for the mapvote ? I mean, the last map played cant be voted for the next 3 map votes..[/QUOTE] That's exactly what my version does (or at least one of the extra features). If it's not working, add my steam and we'll see if we can figure it out.
how do I adapt this votemap to zombiemod survival?
[QUOTE=tyrantelf;41154536]That's exactly what my version does (or at least one of the extra features). If it's not working, add my steam and we'll see if we can figure it out.[/QUOTE] How to set multi-MapPrefixes in one group?
Hey this is working great for me but I am having 1 problem and not sure exactly if there is an easy config edit for it? Ability so that last (X) maps won't show in mapvote? So basically setting it up so the last '3' maps played don't show up? It seems the server continues to pick the same maps over and over and a lot of players are complaining to get more variety. Thanks guys!
[QUOTE=WhoDat;41656620]Hey this is working great for me but I am having 1 problem and not sure exactly if there is an easy config edit for it? Ability so that last (X) maps won't show in mapvote? So basically setting it up so the last '3' maps played don't show up? It seems the server continues to pick the same maps over and over and a lot of players are complaining to get more variety. Thanks guys![/QUOTE] [url]http://facepunch.com/showthread.php?t=1268353&p=40931721&viewfull=1#post40931721[/url]
[QUOTE=Eccid;41659178][url]http://facepunch.com/showthread.php?t=1268353&p=40931721&viewfull=1#post40931721[/url][/QUOTE] Thanks Eccid however my current file has it set-up with that already. [CODE] MapLimit = 12, TimeLimit = 28, AllowCurrentMap = false, EnableCooldown = true, MapsBeforeRevote = 5, RTVPlayerCount = 3, MapPrefixes = {"ttt_", "dm_"} [/CODE] It still shows the last maps played. Any ideas?
function MapVote.HasExtraVotePower(ply) -- Example that gives admins more voting power if ply:IsAdmin() then return true end return false end how would i change this so my vip has the extra power? my ulx vip group is name "vip"
[QUOTE=ghostpanda;41744167]function MapVote.HasExtraVotePower(ply) -- Example that gives admins more voting power if ply:IsAdmin() then return true end return false end how would i change this so my vip has the extra power? my ulx vip group is name "vip"[/QUOTE] [code] if ply:IsAdmin() then return true end if ply:IsUserGroup("vip") then return true end return false end[/code]
thanks il test it. [editline]7th August 2013[/editline] RROR] addons/mapvote/lua/autorun/mapvote.lua:18: 'then' expected near 'return' 1. unknown - addons/mapvote/lua/autorun/mapvote.lua:0 getting that error nvm fixed the error
Ops my fault I forgot to put then after the usergroup
hey hey! i just recently set up a TTT server, along with attempting to install this plugin. I am having a unique issue and i feel it may be a result of how i went about installing it. 1. i DLed the plugin and copied the mapvote folder into my addons folder on the server. 2. i then proceeded to edit my inita.lua file with the code given on the original post. my problem is that as soon as either the x amount of rounds are played or xx amount of time for the map expires.. the server and its inhabitants kinda sit there in limbo. No round starts and no map vote pops. edit: the only sign that anything was even remotly done correctly is the message i see in console and at the top right that says... "the next map will be chosen by a vote"
Okay how do i get this working for prop hunt
I want to allow the clients to open and close the mapvote panel while the server is doing a mapvote. I would like it to have a simple command to open it like !openvote (!mapvote, !vote and !votemap are all used). After messing around with cl_mapvote.lua I realized that I would not be able do what I wanted with the minimize and maximize buttons. Is anyone able to help me with creating a function and ulx command for the clients to open the mapvote menu? [img]http://puu.sh/4xSay.jpg[/img]
Hate to bump a seemingly dead thread, but I've been using this and only this for my servers and I've noticed that when trying to use this with the Prop Hunt gamemode (That uses fretta, but the fretta map-voting is broke, but I've set up MapStart and all in the init.lua of the fretta part) and I get this error every single time it calls the MapStart: [CODE] [ERROR] addons/mapvote/lua/mapvote/cl_mapvote.lua:47: attempt to call method 'SetMaps' (a nil value) 1. func - addons/mapvote/lua/mapvote/cl_mapvote.lua:47 2. unknown - lua/includes/modules/net.lua:31 [/CODE] It works fine w/ my TTT server. Does this have something to do with Fretta?
Hmmmm this is probably a stupid question but how to I make it so that instead of changing the map after 6 rounds it changes after 8 or 10.
Got my own prophunt server running and its going great. I used this updated fretta from here but i only get to vote from the 6 cs_ maps only. I have ph_ maps installed but i can't get it on the list. any help? [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=186387331"]http://steamcommunity.com/sharedfiles/filedetails/?id=186387331[/URL]
Sorry, you need to Log In to post a reply to this thread.