Auto counter cloaker (Payday 2)


SUBMITTED BY: GayBush

DATE: May 30, 2016, 1:40 p.m.

FORMAT: Lua

SIZE: 902 Bytes

HITS: 608

  1. function Remove_Peer(id)
  2. local peer = managers.network._session:peer(id)
  3. if peer then
  4. managers.network._session:on_peer_kicked(peer, id, 2)
  5. managers.network._session:send_to_peers("kick_peer", id, 2)
  6. end
  7. end
  8. if managers.network._session and #managers.network:session():peers() > 0 and Network:is_server() then
  9. local menu_options = {}
  10. for _, peer in pairs(managers.network:session():peers()) do
  11. if peer:rank() and peer:level() then
  12. menu_options[#menu_options+1] ={text = "(" .. peer:rank() .. "-" .. peer:level() .. ") " .. peer:name(), data = peer:id(), callback = Remove_Peer}
  13. else
  14. menu_options[#menu_options+1] ={text = peer:name(), data = peer:id(), callback = Remove_Peer}
  15. end
  16. end
  17. menu_options[#menu_options+1] = {text = "Return", is_cancel_button = true}
  18. local menu = QuickMenu:new("Disconnect", "Select who to disconnect", menu_options)
  19. menu:Show()
  20. end

comments powered by Disqus