Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. function main()
  2. repeat wait(0) until isSampAvailable()
  3. wait(2000)
  4.  
  5. local font_flag = require('moonloader').font_flag
  6. local my_font = renderCreateFont('Verdana', 12, font_flag.BOLD + font_flag.SHADOW)
  7. local count = 0
  8. local count2 = 0
  9. local toggle = true
  10. local toggleChars = true
  11. local admins = {"GM_","Ferrum","Lenka","ShowTime","Misiek"}
  12. local adminsChars = {
  13. -- Komuniści, spierdoliny maślakowe
  14.  
  15. {char = 'Malcolm Lawyers', gm = 'Ferrum'},
  16. {char = 'Samson Richards', gm = 'ShowTime'},
  17. }
  18.  
  19. while true do wait(1)
  20.  
  21. count = 0
  22. count2 = 0
  23.  
  24. if wasKeyReleased(0x24) then
  25. toggle = not toggle
  26. if toggle then printStringNow('~g~ Komuna Checker', 1000) else printStringNow('~r~ Komuna Checker', 1000) end
  27. end
  28.  
  29. if isKeyJustPressed(0x23) then
  30. toggleChars = not toggleChars
  31. if toggleChars then printStringNow('~g~ Komuna Checker - admins chars', 1000) else printStringNow('~r~ Komuna Checker - admins chars', 1000) end
  32. end
  33.  
  34. if isKeyJustPressed(0x77) then
  35. wait(1000)
  36. end
  37.  
  38. if toggle and not isGamePaused() and isPlayerPlaying(PLAYER_HANDLE) then
  39. for i = 0, sampGetMaxPlayerId(false) do
  40. if sampIsPlayerConnected(i) then
  41.  
  42. local nick = sampGetPlayerNickname(i)
  43.  
  44. for _, a in ipairs(admins) do
  45. if string.find(string.lower(nick), string.lower(a)) then
  46. nick = string.gsub(nick, '_', ' ')
  47. renderFontDrawText(my_font, 'Komunisci online:', 10, 400, 0xffFFFFFF)
  48. renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ', 10, 425 + (count * 25) , sampGetPlayerColor(i))
  49. count = count + 1
  50. end
  51. end
  52.  
  53. nick = string.gsub(nick, '_', ' ')
  54.  
  55. if toggleChars then
  56. for _, b in ipairs(adminsChars) do
  57. if string.find(string.lower(nick), string.lower(b['char'])) then
  58. renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ('..b['gm']..') ', 10, 425 + (count * 25) , sampGetPlayerColor(i))
  59. count = count + 1
  60. end
  61. end
  62. end
  63.  
  64. if sampGetPlayerColor(i) == 2852126720 then
  65. renderFontDrawText(my_font, 'Niezalogowani:', 1700, 400, 0xffFFFFFF)
  66. renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ', 1700, 425 + (count2 * 25) , 0xffFFFFFF)
  67. count2 = count2 + 1
  68. end
  69. end
  70. end
  71. end
  72. end
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement