With the latest release, admins can hear players on the other team. Is it possible to turn this off, or is it an undocumented permission level?
Also, could you run down what the last argument for the lua function Vote is?
With the latest release, admins can hear players on the other team. Is it possible to turn this off, or is it an undocumented permission level?
Also, could you run down what the last argument for the lua function Vote is?
The permission is "hearall" and it's grouped with 8192 access. denyAdminCmd = hearall should disable it.
The parameters for Vote are defined in lua\includes\vote.lua and are:
votetext, choices, showtime, append, voteover
Choices should be a table, like:
{"Yes, this is the first choice", "No, this is the second choice"}
Append is some text that show after the choices.
Voteover is a function that is called when the vote is over.
Thanks for the clarification on hearall.
With Vote, where are the results outputted?
The results are passed into the function you specify. Checkout mapveto.lua.
Code:function mapveto_voteover(vote) local yesvotes = vote.picks[1] local total = vote.picks[1] + vote.picks[2] local nonvoters = table.Count(player.GetAll()) - total local yespercentage = (yesvotes / total) * 100 local percentyes = tostring(math.floor(yespercentage)) .. "%" ... end
this is super cool.
omg larz wtf