Results 1 to 7 of 7

Thread: Admin hear all/see all?

  1. #1
    nicatronTg's Avatar



    Join Date
    Aug 23, 2009
    Last Online
    Jul 30, 2011
    Posts
    57
    Threads
    7



    Admin hear all/see all?


    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?

  2. #2
    Drunken F00l's Avatar



    Join Date
    Dec 11, 2004
    Last Online
    Jun 11, 2019
    Posts
    5,874
    Threads
    182
    Reputation
    SourceOP Thread


        
    Steam: 76561197968459473 
    Steam join date: Aug 23, 2004
    Steam Level: 56
    Profile Status: Public



    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.

  3. #3
    nicatronTg's Avatar



    Join Date
    Aug 23, 2009
    Last Online
    Jul 30, 2011
    Posts
    57
    Threads
    7




    Thanks for the clarification on hearall.

    With Vote, where are the results outputted?

  4. #4
    Drunken F00l's Avatar



    Join Date
    Dec 11, 2004
    Last Online
    Jun 11, 2019
    Posts
    5,874
    Threads
    182
    Reputation
    SourceOP Thread


        
    Steam: 76561197968459473 
    Steam join date: Aug 23, 2004
    Steam Level: 56
    Profile Status: Public



    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

  5. #5
    nicatronTg's Avatar



    Join Date
    Aug 23, 2009
    Last Online
    Jul 30, 2011
    Posts
    57
    Threads
    7




    Ah, thanks.

  6. #6
    larz's Avatar



    Join Date
    Jan 26, 2006
    Last Online
    Feb 19, 2013
    Posts
    1,460
    Threads
    125




    this is super cool.

  7. #7
    Drunken F00l's Avatar



    Join Date
    Dec 11, 2004
    Last Online
    Jun 11, 2019
    Posts
    5,874
    Threads
    182
    Reputation
    SourceOP Thread


        
    Steam: 76561197968459473 
    Steam join date: Aug 23, 2004
    Steam Level: 56
    Profile Status: Public



    omg larz wtf

Tags for this Thread