Guest User

Untitled

a guest
May 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. ShowAdmins = true
  2.  
  3. function toggleAdminList()
  4. if ShowAdmins then
  5. ShowAdmins = false
  6. else
  7. showAdmins = true
  8. end
  9. end
  10.  
  11. toggleAdminList()
  12.  
  13. concommand.Add("show_admin", function()
  14. toggleAdminList()
  15. end)
  16.  
  17. hook.Add("HUDPaint", "toggleAdminList", function()
  18. if ShowAdmins then
  19. for k, v in pairs(player.GetAll()) do
  20. if v:IsAdmin() or v:IsSuperAdmin() then
  21. adminList = adminList .. ", " .. v:Nick() // use .. to concat strings
  22. end
  23. end
  24.  
  25.  
  26. if (adminList != "") then
  27. adminList = string.sub(adminList, 3, string.len(adminList))
  28. draw.SimpleText("Admins: "..adminList, ScrW() * 0.8, ScrH() * 0.2, Color(0, 255, 0, 200), 1, 1)
  29. else
  30. draw.SimpleText("No admins online!", ScrW() * 0.8, ScrH() * 0.2, Color(255, 0, 0, 200), 1, 1)
  31. end
  32. end
  33. end)
Add Comment
Please, Sign In to add comment