Admin hear all/see all? -
nicatronTg - Oct 17, 2010
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?
Admin hear all/see all? -
Drunken F00l - Oct 17, 2010
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.
Admin hear all/see all? -
nicatronTg - Oct 17, 2010
Thanks for the clarification on hearall.
With Vote, where are the results outputted?
Admin hear all/see all? -
Drunken F00l - Oct 17, 2010
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
Admin hear all/see all? -
nicatronTg - Oct 17, 2010
Ah, thanks.
Admin hear all/see all? -
larz - Dec 21, 2010
this is super cool.
Admin hear all/see all? -
Drunken F00l - Dec 21, 2010
omg larz wtf