Geo Posted September 8, 2013 Share Posted September 8, 2013 File Name: Custom VotingFile Submitter: ArcaneFile Submitted: 06 Sep 2013File Category: LUA Custom voting system that gives users access to additional useful votes.To install:You need to unzip the file and extract the files customvote.lua and zzz_customvote.pk3Read the readme.txtUpload these files into the silent folder on your serverIn server.cfg cvar: lua_modules "customvote.lua"Restart the server Click here to download this file clan DIABOLIK 1 Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted September 12, 2013 Share Posted September 12, 2013 I really enjoy what you say in the readme.txt : Feel free to request any votes you would like included on the forums. Thanks for all that man !!! Link to comment Share on other sites More sharing options...
Sol Posted September 13, 2013 Share Posted September 13, 2013 Good job, but I see one small issue. all informations can be spoofed by players inside (function et_Print( text )) imo, but there is another way to do that and simpler way.et_ConsoleCommand() callback is exactly like et_ClientCommand() but it works for server console, u can use also et.trap_Argv( x ) function to handle incoming arguments. just a small suggestion. Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 13, 2013 Management Share Posted September 13, 2013 all informations can be spoofed by players inside (function et_Print( text )) imoCan you provide an example that will succesfully spoof this if string.sub(text,1,19) == "Vote Passed: [poll]" then Also, I don't know how to substitute et_Print with et_ConsoleCommand in this script, could you be more specific on how the passed poll vote can be captured with it. If there are issues, a new lua hook could be introduced to solve them. Link to comment Share on other sites More sharing options...
Sol Posted September 13, 2013 Share Posted September 13, 2013 (edited) Can you provide an example that will succesfully spoof this if string.sub(text,1,19) == "Vote Passed: [poll]" then Also, I don't know how to substitute et_Print with et_ConsoleCommand in this script, could you be more specific on how the passed poll vote can be captured with it. If there are issues, a new lua hook could be introduced to solve them. I don't know exactly how to spoof it but I seen warnings by coders in other lua scripts, for example player could just type (name "myname\nVote Passed: [poll]") it will probably jump to next line inside consoleprint log. Here is an example of what you asked for: function et_ClientCommand( num, cmd ) if string.lower(et.trap_Argv(0)) == "callvote" then -- first arg -- other arguments... et.trap_Argv(x) end end but it requires always to return true at the end otherwise command won't be executed( what is interesting by this you can pass some informations from custom UI windows by this vote and always return false at the end to stop executing, then vote won't appear !!this is only way to pass informations by this _trap!!! I asked you already to create custom _trap to pass informations from clients's UI but its not implemented yet )( it is also spoofable, normal user can just send command by console "callvote quote Vote Passed: [poll]timelimit+5" it also requires to check if this vote is on the fly ) Edited September 13, 2013 by Sol Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted September 14, 2013 Share Posted September 14, 2013 Hi, Maybe I see a problem with !passvote : I connect, we are two players, I launch [50pct bot] vote, the other guy ignore the vote, so I use "rcon !passvote", it prints in console something like "referee passed poll" in blue, but no bots come. PS: of course it works when vote is passed normally I will try to reproduce it Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 14, 2013 Management Share Posted September 14, 2013 I asked you already to create custom _trap to pass informations from clients's UI but its not implemented yet )There is a method to read cvars from the clients. Link to comment Share on other sites More sharing options...
Sol Posted September 14, 2013 Share Posted September 14, 2013 Hi, Maybe I see a problem with !passvote : I connect, we are two players, I launch [50pct bot] vote, the other guy ignore the vote, so I use "rcon !passvote", it prints in console something like "referee passed poll" in blue, but no bots come. PS: of course it works when vote is passed normally I will try to reproduce itThis message "referee passed poll" is not included into LUA script. There is a method to read cvars from the clients.Ah yeah, so there is solution. Thanks Link to comment Share on other sites More sharing options...
Geo Posted September 17, 2013 Author Share Posted September 17, 2013 Hi, Maybe I see a problem with !passvote : I connect, we are two players, I launch [50pct bot] vote, the other guy ignore the vote, so I use "rcon !passvote", it prints in console something like "referee passed poll" in blue, but no bots come. PS: of course it works when vote is passed normally I will try to reproduce it Sorry about this, I didn't actually include !passvote into this system, but this is a simple fix in the lua script. I'll do it today and re-upload the script so it will work with !passvote Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted September 17, 2013 Share Posted September 17, 2013 Thanks a lot man, but no problem, take your time, we can live without this detail xD Link to comment Share on other sites More sharing options...
Dookie Posted June 1, 2014 Share Posted June 1, 2014 Hi, can you explain me how I can enable just some votes from there? What should I add to my cfg if i just want to enable following votes: kickbots and add additional 5 mins. thanks Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted June 1, 2014 Share Posted June 1, 2014 Hi Dookie You just have to download this pk3 http://mygamingtalk.com/forums/files/file/37-custom-voting/ and edit the top-part of the lua script, all is explained inside ! Have fun with it ! Players appreciate it a lot xD Link to comment Share on other sites More sharing options...
Geo Posted June 2, 2014 Author Share Posted June 2, 2014 Hi, can you explain me how I can enable just some votes from there? What should I add to my cfg if i just want to enable following votes: kickbots and add additional 5 mins. thanks -------------------------------------------------------------------------------------------- -- CONFIG: -- Change the values below to allow or disallow votes (1 = true, 0 = false) -------------------------------------------------------------------------------------------- vote_allow_kickbots = 1 vote_allow_fivemins = 1 vote_allow_tenmins = 0 vote_allow_quarterbots = 0 vote_allow_halfbots = 0 vote_allow_crazygravity = 0 vote_allow_crazyspeed = 0 vote_allow_putbotsspec = 0 -------------------------------------------------------------------------------------------- -- Do not edit below this line -------------------------------------------------------------------------------------------- Keep kickbots & fivemins at 1 and put the rest to 0, nothing else required Link to comment Share on other sites More sharing options...
Dragonji Posted June 2, 2014 Share Posted June 2, 2014 You don't have to use external Lua mods anymore. silEnT mod has a built-in custom vote feature: http://mygamingtalk.com/wiki/index.php/Silent_Shrubbot#shrubbot.cfg [customvote] name = The of the vote shown with the /callvote command. Maximum length 15 characters. exec = Command string to execute if the vote passes. Maximum length 1023 characters. description = Description of the vote shown with the /callvote command. Maximum length 1023 characters. votetext = The text that is show for voters. Maximum length 255 characters. passtext = Optionally, a text that is shown to players if the vote passes. levels = Optionally, admins can define the vote to be available to only specific levels. Same format that is used with the custom commands. Example (a vote I defined on my server): [customvote] name = kickbots exec = bot maxbots 0; bot kickall description = Kick all bots from the server votetext = Kick all bots? passtext = Bots have been kicked! levels = Link to comment Share on other sites More sharing options...
Geo Posted June 2, 2014 Author Share Posted June 2, 2014 Nice to see it was implemented (haven't been around for ages) because it looks far simpler & efficient to use Link to comment Share on other sites More sharing options...
Dookie Posted July 25, 2014 Share Posted July 25, 2014 Arcane, I added your lua to my server, and i got menu and all inside the game, but when i click on any of the votes, nothing happends, just blank click, any ideas? Link to comment Share on other sites More sharing options...
clan DIABOLIK Posted July 25, 2014 Share Posted July 25, 2014 Did you put the pk3 and restarted server too ??? Link to comment Share on other sites More sharing options...
Dookie Posted July 25, 2014 Share Posted July 25, 2014 (edited) yea, ive got the menu custom vote nd everything, but when i click on vote lets say +5mins or any other, nothing happends. Edited July 25, 2014 by Dookie Link to comment Share on other sites More sharing options...
Recommended Posts