Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- repeat wait(0) until isSampAvailable()
- wait(2000)
- local font_flag = require('moonloader').font_flag
- local my_font = renderCreateFont('Verdana', 12, font_flag.BOLD + font_flag.SHADOW)
- local count = 0
- local count2 = 0
- local toggle = true
- local toggleChars = true
- local admins = {"GM_","Ferrum","Lenka","ShowTime","Misiek"}
- local adminsChars = {
- -- Komuniści, spierdoliny maślakowe
- {char = 'Malcolm Lawyers', gm = 'Ferrum'},
- {char = 'Samson Richards', gm = 'ShowTime'},
- }
- while true do wait(1)
- count = 0
- count2 = 0
- if wasKeyReleased(0x24) then
- toggle = not toggle
- if toggle then printStringNow('~g~ Komuna Checker', 1000) else printStringNow('~r~ Komuna Checker', 1000) end
- end
- if isKeyJustPressed(0x23) then
- toggleChars = not toggleChars
- if toggleChars then printStringNow('~g~ Komuna Checker - admins chars', 1000) else printStringNow('~r~ Komuna Checker - admins chars', 1000) end
- end
- if isKeyJustPressed(0x77) then
- wait(1000)
- end
- if toggle and not isGamePaused() and isPlayerPlaying(PLAYER_HANDLE) then
- for i = 0, sampGetMaxPlayerId(false) do
- if sampIsPlayerConnected(i) then
- local nick = sampGetPlayerNickname(i)
- for _, a in ipairs(admins) do
- if string.find(string.lower(nick), string.lower(a)) then
- nick = string.gsub(nick, '_', ' ')
- renderFontDrawText(my_font, 'Komunisci online:', 10, 400, 0xffFFFFFF)
- renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ', 10, 425 + (count * 25) , sampGetPlayerColor(i))
- count = count + 1
- end
- end
- nick = string.gsub(nick, '_', ' ')
- if toggleChars then
- for _, b in ipairs(adminsChars) do
- if string.find(string.lower(nick), string.lower(b['char'])) then
- renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ('..b['gm']..') ', 10, 425 + (count * 25) , sampGetPlayerColor(i))
- count = count + 1
- end
- end
- end
- if sampGetPlayerColor(i) == 2852126720 then
- renderFontDrawText(my_font, 'Niezalogowani:', 1700, 400, 0xffFFFFFF)
- renderFontDrawText(my_font, '' ..i.. ' - ' ..nick.. ' ', 1700, 425 + (count2 * 25) , 0xffFFFFFF)
- count2 = count2 + 1
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement