Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-05-06, 18:48


Vevtar







Wiek: 36
Na forum: 2743 dni
Posty: 5
Nick w MP: Vevtar



Respekt: 50

Jak mo?na doda? nowa range np Test Moderator na paczk? pys 3.0 nie wiem co? w plikach pys-admin albo cos trzeba zminic za pomoc daje :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-06, 20:21


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

zmieniasz tak naprawd? w dw?ch folderach rzeczy zaczynsz od pystories-nametags
zmieniasz levele
if level == 1 then
                                dxDrawText("#FFFFFF[#00FF00"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#01bf34Moderator#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
to masz jako pierwsze wi?c kopiujesz to
dodajesz elseif level == i zmieniasz to co teraz masz na 1 lvlu na 2 gotowy kod
 local level tonumber(getElementData(player"player:level"))
                            local p_level tonumber(getElementData(player"premium:level"))
                            if level == 1 then
                                dxDrawText("#FFFFFF[#01bf34"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#01bf34Testowy Moderator#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            elseif level == 2 then
                                dxDrawText("#FFFFFF[#01bf34"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#01bf34Moderator#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            elseif level == 3 then
                                dxDrawText("#FFFFFF[#ff0000"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#ff0000Administrator#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            elseif level == 4 then
                                dxDrawText("#FFFFFF[#a31303"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#a31303ROOT#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            elseif level == 5 then
                                dxDrawText("#FFFFFF[#8F00FF"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#8F00FFPracownik Techniczny#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            elseif p_level == 1 then
                                dxDrawText("#FFFFFF[#C0FF00"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                                dxDrawText("#FFFFFF[#C0FF00Premium#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            else
                                dxDrawText("#FFFFFF[#FFFFFF"..getElementData(player"id").."#FFFFFF] #FFFFFF"..getPlayerName(player):gsub("#%x%x%x%x%x%x","")..""fXfYfXfYtocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true) -- ,false,true
                                dxDrawText("#FFFFFF[#FFFFFF#FFFFFFGracz#FFFFFF]"fXfY-16fXfY-16tocolor(255255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            end
                            if getElementData(player,"mute:player"then
                            --dxDrawText("[Wyciszony]"sxc1+1syc1+1sxc1+1syc1+1tocolor(000alpha), nametagScalenametagFont"center""center",false,false,false,true,true)
                            dxDrawText("#FFFFFF[#FFFF00Wyciszony#FFFFFF]"fXfY-32fXfY-32tocolor(0255255255), nametagScalenametagFont"center""center",false,false,false,true,true)
                            end

Name tagi masz za sob? a teraz czas na wy?wietlanie. Czas przej?? do duty. Wchodzisz w pystories-admin i i robisz nast?puj?ce rzeczy. Podmieniasz plik s_utility.lua na ten
 function RGBToHex(redgreenbluealpha)
    if((red or red 255 or green or green 255 or blue or blue 255) or (alpha and (alpha or alpha 255))) then
        return nil
    end
    if(alphathen
        return string.format("#%.2X%.2X%.2X%.2X"red,green,blue,alpha)
    else
        return string.format("#%.2X%.2X%.2X"red,green,blue)
    end
end

function getAdmin(plr,level)
    if getElementData(plr,"Ryjek"then return true end
    if level then
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=? AND level=?"getPlayerSerial(plr), level)
        if result and #result > 0 then
            return true
        else
            return false
        end
    else
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=?"getPlayerSerial(plr))
        if result and #result > 0 then
            return true
        else
            return false
        end
    end
end

function cmd_admins(plr)
    local tmoderatorzy={}
  local moderatorzy={}
  local admini={}
  local rconi={}
  local owner={}
  for i,v in ipairs(getElementsByType("player")) do
    local adminer getElementData(v,"player:id")
    if not getElementData(v,"Ryjek"then 
    --if not getElementData(v"p:inv"then
      if (getAdmin(v,4)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(owner,t)
      end
    end
    if (getAdmin(v,3)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(rconi,t)
      end
    end
    if (getAdmin(v,2)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(admini,t)
      end
    end
    if (getAdmin(v,2)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(moderatorzy,t)
      end
    end
    if (getAdmin(v,1)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(tmoderatorzy,t)
      end
    end
    end
end

  outputChatBox("Pracownicy Techniczni:"plr1420255)
  if (#owner>0) then
    outputChatBox("* " .. table.concat(owner,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end

  outputChatBox("Administratorzy ROOT:"plr10000)
  if (#rconi>0) then
    outputChatBox("* " .. table.concat(rconi,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end
  
  outputChatBox("Administratorzy:"plr25500)
  if (#admini>0) then
    outputChatBox("* " .. table.concat(admini,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end

  outputChatBox("Moderatorzy:"plr01020)
  if (#moderatorzy>0) then
    outputChatBox("* " .. table.concat(moderatorzy,", "), plr)
  else
    outputChatBox("* Brak."plr)
    end
    outputChatBox("Testowy Moderatorzy:"plr02550)
  if (#moderatorzy>0) then
    outputChatBox("* " .. table.concat(moderatorzy,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end
end
addCommandHandler("admins"cmd_adminsfalsefalse)
addCommandHandler("ekipa"cmd_adminsfalsefalse)
addCommandHandler("admini"cmd_adminsfalsefalse)

function destroyBlipsAttachedTo(player)
    local attached getAttachedElements player )
    if ( attached then
        for k,element in ipairs(attached) do
            if getElementType element ) == "blip" then
                destroyElement element )
            end
        end
    end
end

addCommandHandler("duty", function(plr,cmd)
    if getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not getElementData(plr,"player:admin"then
            giveWeapon(plr,22)
            toggleControl(plr,"fire",true)
            toggleControl(plr,"aim_weapon",true)
            if getAdmin(plr1then
                setElementData(plr,"player:level",1)
                setElementData(plr,"last:nick",getPlayerName(plr))
                        setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
                        setPlayerName(plr,"#00FF00"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
                        outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Testowego Moderatora."plr)
            elseif getAdmin(plr2then
            setElementData(plr,"player:level",1)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#01bf34"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr02019152)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Moderatora."plr)
            elseif getAdmin(plr2then
            setElementData(plr,"player:level",2)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#ff0000"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr0225500)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Administratora."plr)
            elseif getAdmin(plr3then
            setElementData(plr,"player:level",3)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#a31303"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr0210000)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be ROOT'a."plr)
            elseif getAdmin(plr4then
            setElementData(plr,"player:level",4)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#8F00FF"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr021420255)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Pracownika Technicznego."plr)
            end
            setElementData(plr,"player:admin",true)
            setElementData(plr,"player:ucho",true)
            --outputChatBox("* Zalogowa?e?(a?) si? na slu?be (/admins)."plr)
        else
            takeWeapon(plr,22)
            toggleControl(plr,"fire",false)
            toggleControl(plr,"aim_weapon",false)
            removeElementData(plr,"player:admin")
            removeElementData(plr,"player:level")
            setElementData(plr,"player:ucho",false)
            outputChatBox("* Wylogowa?e?(a?) si? z s?u?by administracji serwera."plr)
            setPlayerName(plr,getElementData(plr,"last:nick"))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr02100100100)
        end
    else
        --outputChatBox("* Nie posiadasz uprawnie?."plr25500)
    end
end)

scianarapsow createObject 16637,-1931.6,883.27,35.41 )
setObjectScale(scianarapsow,3)
setElementDimension(scianarapsow,9999)
reportView = {{"?ciana Raport?w:",0}}
setElementData(scianarapsow,"sciana:raportow",reportView)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 17 then
        table.remove(reportView2)
    end
    setElementData(scianarapsow,"sciana:raportow",reportView)
end)

addEvent("admin:removeReport"true)
addEventHandler("admin:removeReport"root, function(id)
    for i=#reportView, 2, -1 do
        if reportView[i][2] == id then
            table.remove(reportView,i)
        end
    end
    setElementData(scianarapsow,"sciana:raportow",reportView)
end)

scianatext createObject 981,0,0,)
textView = {{"Logi Serwerowe:",0}}
setElementDimension(scianatext,9999)
setElementData(scianatext,"sciana:text",textView)


addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text,id)
    table.insert(textView, {text,id})
    if #textView > 17 then
        table.remove(textView2)
    end
    setElementData(scianatext,"sciana:text",textView)
end)

addEvent("admin:removeText"true)
addEventHandler("admin:removeText"root, function(id)
    for i=#textView, 2, -1 do
        if textView[i][2] == id then
            table.remove(textView,i)
        end
    end
    setElementData(scianatext,"sciana:text",textView)
end)

--[[addCommandHandler("raport", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /raport <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["ogrpg-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc=getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."("..getElementData(plr,"id")..") >> "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id").."): "..text:gsub("#%x%x%x%x%x%x","")
    triggerClientEvent(root"admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
end)

addCommandHandler("cl", function(plr,cmd,id,...)
    if not getAdmin(plrthen
        outputChatBox("* Nie posiadasz uprawnie?."plr25500)
        return
    end
    local reason=table.concat({...}, " ")
    local target=exports["ogrpg-core"]:findPlayer(plr,id)
    opis "Brak Online"
    if target then
        id=getElementData(target,"id")
        opis=getPlayerName(target)
    end
    for i,v in ipairs(getElementsByType("player")) do
        if getAdmin(vthen
        --    if getElementData(v,"player:admin"then
                triggerClientEvent(v"admin:removeReport"resourceRootid)
                outputChatBox("#FFFF00CL #FFFFFF> #FF0000"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." #919191usun??/??a raport na: #FF0000"..opis:gsub("#%x%x%x%x%x%x","").."#919191/#FF0000"..id.."#919191: #919191"..reasonv25500true)
        --    end
        end
    end
end)--]]

addCommandHandler("raport", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /raport <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc="["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." >> ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..": "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..""plr)
end)

addCommandHandler("report", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /report <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc="["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." >> ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..": "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..""plr)
end)

addCommandHandler("cl", function(plr,cmd,id,...)
    if not getAdmin(plrthen
        outputChatBox("* Nie posiadasz uprawnie?."plr25500)
        return
    end
    --local reason=table.concat({...}, " ")
    local target=exports["pystories-core"]:findPlayer(plr,id)
    opis "Brak Online"
    if target then
        id=getElementData(target,"id")
        opis=getPlayerName(target)
        if target ~= plr and not getAdmin(targetthen
        end
    end
    for i,v in ipairs(getElementsByType("player")) do
        --if getAdmin(vthen
        if getElementData(v,"player:admin"then
                triggerEvent("admin:removeReport"resourceRootid)
                --outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." usun??/??a raport na: "..opis:gsub("#%x%x%x%x%x%x","").."/"..id..": "..reasonv25500)
                outputChatBox("#FFFF00CL #FFFFFF> #FF0000["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." #919191usun??/??a raport na: #FF0000["..id.."]#FF0000"..opis:gsub("#%x%x%x%x%x%x","").."#919191."v25500true)
        --    end
        end
    end
end)

teraz otwierasz plik s_cmd.lua i podmie? to ca?e bo nie chce mi si? wymieni? co doda?em i teraz najwa?niejsze musisz sobie sam nada? odpowiednie uprawnienia bo obecnie Technik kt?ry by? na levleu 4 nie ma ?adnych uprawnie?. Tu masz s_cmd bo tu si? nie mie?ci
https://megawrzuta.pl/schowek/bzqRm

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-06, 21:49


Vevtar







Wiek: 36
Na forum: 2743 dni
Posty: 5
Nick w MP: Vevtar



Respekt: 50

Skrypt nie dzia?a za dobrze je?eli mam range 5 to nic nie mog? zrobi? nic nie dzia?a na pracowniku technicznym.

[ Dodano: 2019-05-06, 21:56 ]
Skrypt kt?ry poda?e? zepsu? wszystkie rangi jedyne do czego rangi maja dost?p to latanie na Zedce. Je?eli mog? prosi? to wyslanie kodu bez b?ed?w:

if (getAdmin(plr,2)) then
ranga = "#FFFF00Administrator"
end
if (getAdmin(plr,2)) then
ranga = "#00FF00Moderator"

O ile wiem nie moge sie powtarza?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-06, 22:47


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

"Vevtar" napisał/a:

Skrypt nie dzia?a za dobrze je?eli mam range 5 to nic nie mog? zrobi? nic nie dzia?a na pracowniku technicznym.

[ Dodano: 2019-05-06, 21:56 ]
Skrypt kt?ry poda?e? zepsu? wszystkie rangi jedyne do czego rangi maja dost?p to latanie na Zedce. Je?eli mog? prosi? to wyslanie kodu bez b?ed?w:

if (getAdmin(plr,2)) then
ranga = "#FFFF00Administrator"
end
if (getAdmin(plr,2)) then
ranga = "#00FF00Moderator"

O ile wiem nie moge sie powtarza?.

Powiedz mi co za problem zmieni? rangi kt?re zapomnia?em z 2,3 z 3,4 i z 4,5
??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 16:04


Vevtar







Wiek: 36
Na forum: 2743 dni
Posty: 5
Nick w MP: Vevtar



Respekt: 50

opr?cz tego co tu napisa?e? po nadaniu rangi np Rcon nic nie da si? robi?, na ka?dej randze tak samo !! .

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 19:04


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

function RGBToHex(redgreenbluealpha)
    if((red or red 255 or green or green 255 or blue or blue 255) or (alpha and (alpha or alpha 255))) then
        return nil
    end
    if(alphathen
        return string.format("#%.2X%.2X%.2X%.2X"red,green,blue,alpha)
    else
        return string.format("#%.2X%.2X%.2X"red,green,blue)
    end
end

function getAdmin(plr,level)
    if getElementData(plr,"Ryjek"then return true end
    if level then
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=? AND level=?"getPlayerSerial(plr), level)
        if result and #result > 0 then
            return true
        else
            return false
        end
    else
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_admins WHERE serial=?"getPlayerSerial(plr))
        if result and #result > 0 then
            return true
        else
            return false
        end
    end
end

function cmd_admins(plr)
    local tmoderatorzy={}
  local moderatorzy={}
  local admini={}
  local rconi={}
  local owner={}
  for i,v in ipairs(getElementsByType("player")) do
    local adminer getElementData(v,"player:id")
    if not getElementData(v,"Ryjek"then 
    --if not getElementData(v"p:inv"then
      if (getAdmin(v,5)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(owner,t)
      end
    end
    if (getAdmin(v,4)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(rconi,t)
      end
    end
    if (getAdmin(v,3)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(admini,t)
      end
    end
    if (getAdmin(v,2)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(moderatorzy,t)
      end
    end
    if (getAdmin(v,1)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(tmoderatorzy,t)
      end
    end
    end
end

  outputChatBox("Pracownicy Techniczni:"plr1420255)
  if (#owner>0) then
    outputChatBox("* " .. table.concat(owner,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end

  outputChatBox("Administratorzy ROOT:"plr10000)
  if (#rconi>0) then
    outputChatBox("* " .. table.concat(rconi,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end
  
  outputChatBox("Administratorzy:"plr25500)
  if (#admini>0) then
    outputChatBox("* " .. table.concat(admini,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end

  outputChatBox("Moderatorzy:"plr01020)
  if (#moderatorzy>0) then
    outputChatBox("* " .. table.concat(moderatorzy,", "), plr)
  else
    outputChatBox("* Brak."plr)
    end
    outputChatBox("Testowy Moderatorzy:"plr02550)
  if (#tmoderatorzy>0) then
    outputChatBox("* " .. table.concat(tmoderatorzy,", "), plr)
  else
    outputChatBox("* Brak."plr)
  end
end
addCommandHandler("admins"cmd_adminsfalsefalse)
addCommandHandler("ekipa"cmd_adminsfalsefalse)
addCommandHandler("admini"cmd_adminsfalsefalse)

function destroyBlipsAttachedTo(player)
    local attached getAttachedElements player )
    if ( attached then
        for k,element in ipairs(attached) do
            if getElementType element ) == "blip" then
                destroyElement element )
            end
        end
    end
end

addCommandHandler("duty", function(plr,cmd)
    if getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1then
        if not getElementData(plr,"player:admin"then
            giveWeapon(plr,22)
            toggleControl(plr,"fire",true)
            toggleControl(plr,"aim_weapon",true)
            if getAdmin(plr1then
                setElementData(plr,"player:level",1)
                setElementData(plr,"last:nick",getPlayerName(plr))
                        setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
                        setPlayerName(plr,"#00FF00"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
                        outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Testowego Moderatora."plr)
            elseif getAdmin(plr2then
            setElementData(plr,"player:level",1)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#01bf34"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr02019152)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Moderatora."plr)
            elseif getAdmin(plr3then
            setElementData(plr,"player:level",2)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#ff0000"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr0225500)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Administratora."plr)
            elseif getAdmin(plr4then
            setElementData(plr,"player:level",3)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#a31303"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr0210000)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be ROOT'a."plr)
            elseif getAdmin(plr5then
            setElementData(plr,"player:level",4)
            setElementData(plr,"last:nick",getPlayerName(plr))
            setElementData(plr,"last:color",tostring(getPlayerNametagColor(plr)))
            setPlayerName(plr,"#8F00FF"..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr021420255)
            outputChatBox("* Zalogowa?e?(a?) si? na s?u?be Pracownika Technicznego."plr)
            end
            setElementData(plr,"player:admin",true)
            setElementData(plr,"player:ucho",true)
            --outputChatBox("* Zalogowa?e?(a?) si? na slu?be (/admins)."plr)
        else
            takeWeapon(plr,22)
            toggleControl(plr,"fire",false)
            toggleControl(plr,"aim_weapon",false)
            removeElementData(plr,"player:admin")
            removeElementData(plr,"player:level")
            setElementData(plr,"player:ucho",false)
            outputChatBox("* Wylogowa?e?(a?) si? z s?u?by administracji serwera."plr)
            setPlayerName(plr,getElementData(plr,"last:nick"))
            --destroyBlipsAttachedTo(plr)
            --createBlipAttachedTo(plr02100100100)
        end
    else
        --outputChatBox("* Nie posiadasz uprawnie?."plr25500)
    end
end)

scianarapsow createObject 16637,-1931.6,883.27,35.41 )
setObjectScale(scianarapsow,3)
setElementDimension(scianarapsow,9999)
reportView = {{"?ciana Raport?w:",0}}
setElementData(scianarapsow,"sciana:raportow",reportView)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 17 then
        table.remove(reportView2)
    end
    setElementData(scianarapsow,"sciana:raportow",reportView)
end)

addEvent("admin:removeReport"true)
addEventHandler("admin:removeReport"root, function(id)
    for i=#reportView, 2, -1 do
        if reportView[i][2] == id then
            table.remove(reportView,i)
        end
    end
    setElementData(scianarapsow,"sciana:raportow",reportView)
end)

scianatext createObject 981,0,0,)
textView = {{"Logi Serwerowe:",0}}
setElementDimension(scianatext,9999)
setElementData(scianatext,"sciana:text",textView)


addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text,id)
    table.insert(textView, {text,id})
    if #textView > 17 then
        table.remove(textView2)
    end
    setElementData(scianatext,"sciana:text",textView)
end)

addEvent("admin:removeText"true)
addEventHandler("admin:removeText"root, function(id)
    for i=#textView, 2, -1 do
        if textView[i][2] == id then
            table.remove(textView,i)
        end
    end
    setElementData(scianatext,"sciana:text",textView)
end)

--[[addCommandHandler("raport", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /raport <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["ogrpg-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc=getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."("..getElementData(plr,"id")..") >> "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."("..getElementData(target,"id").."): "..text:gsub("#%x%x%x%x%x%x","")
    triggerClientEvent(root"admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
end)

addCommandHandler("cl", function(plr,cmd,id,...)
    if not getAdmin(plrthen
        outputChatBox("* Nie posiadasz uprawnie?."plr25500)
        return
    end
    local reason=table.concat({...}, " ")
    local target=exports["ogrpg-core"]:findPlayer(plr,id)
    opis "Brak Online"
    if target then
        id=getElementData(target,"id")
        opis=getPlayerName(target)
    end
    for i,v in ipairs(getElementsByType("player")) do
        if getAdmin(vthen
        --    if getElementData(v,"player:admin"then
                triggerClientEvent(v"admin:removeReport"resourceRootid)
                outputChatBox("#FFFF00CL #FFFFFF> #FF0000"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." #919191usun??/??a raport na: #FF0000"..opis:gsub("#%x%x%x%x%x%x","").."#919191/#FF0000"..id.."#919191: #919191"..reasonv25500true)
        --    end
        end
    end
end)--]]

addCommandHandler("raport", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /raport <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc="["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." >> ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..": "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..""plr)
end)

addCommandHandler("report", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("* U?yj: /report <nick/ID> <pow?d>"plr)
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        outputChatBox("* Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc="["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." >> ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..": "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(target,"id"))
--    triggerClientEvent(root"onDebugMessage"resourceRootdesc,2"Report")
    outputChatBox("* Pomy?lnie wys?ano zg?oszenie na gracza: ["..getElementData(target,"id").."]"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..""plr)
end)

addCommandHandler("cl", function(plr,cmd,id,...)
    if not getAdmin(plrthen
        outputChatBox("* Nie posiadasz uprawnie?."plr25500)
        return
    end
    --local reason=table.concat({...}, " ")
    local target=exports["pystories-core"]:findPlayer(plr,id)
    opis "Brak Online"
    if target then
        id=getElementData(target,"id")
        opis=getPlayerName(target)
        if target ~= plr and not getAdmin(targetthen
        end
    end
    for i,v in ipairs(getElementsByType("player")) do
        --if getAdmin(vthen
        if getElementData(v,"player:admin"then
                triggerEvent("admin:removeReport"resourceRootid)
                --outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." usun??/??a raport na: "..opis:gsub("#%x%x%x%x%x%x","").."/"..id..": "..reasonv25500)
                outputChatBox("#FFFF00CL #FFFFFF> #FF0000["..getElementData(plr,"id").."]"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." #919191usun??/??a raport na: #FF0000["..id.."]#FF0000"..opis:gsub("#%x%x%x%x%x%x","").."#919191."v25500true)
        --    end
        end
    end
end)

i w s_cmd zmie? w linijce odpowiednie poziomy bo tam te? nie zmieni?em ps wysy?aj logi db3 bo te? jest przydatne
addCommandHandler('ac', function(plr,cmd, ...)
local name getPlayerName(plr):gsub("#%x%x%x%x%x%x","")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 19:56


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

pisz tutaj podaj db3 lub co Ci nie dzia?a je?eli masz now? rang? 5 czyli obecnie technika to owszem nic pr?cz latania Ci nie dzia?a bo nie dodawa?em je?eli masz ni?sz? ni? 5 to db3 lub podaj twoje podmienione pliki w ftp czy na pewno masz takie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 20:09


Vevtar







Wiek: 36
Na forum: 2743 dni
Posty: 5
Nick w MP: Vevtar



Respekt: 50

Czy mo?esz zrobi? taki kod ze jest
1.Technik
2. Opiekun
3.ROOT
4. Admin
5. Moderator
6. Test Moderator

Mog? zap?aci? !! chodzi mi o te rangi

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 20:18


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

"Vevtar" napisał/a:

Czy mo?esz zrobi? taki kod ze jest
1.Technik
2. Opiekun
3.ROOT
4. Admin
5. Moderator
6. Test Moderator

Mog? zap?aci? !! chodzi mi o te rangi

Po pierwsze powiedz mi czy tamte rangi dzia?aj? co Ci zrobi?em pr?cz technika

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 21:24


Vevtar







Wiek: 36
Na forum: 2743 dni
Posty: 5
Nick w MP: Vevtar



Respekt: 50

Nie dzia?aj? za dobrze jedyne co maj? to latanie na Zece i name tags

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-05-07, 21:52


killercycDDS

Migacz






Wiek: 25
Na forum: 4512 dni
Posty: 629
Nick w MP: killer_cyc[DDS]

Piwa: 1659

Respekt: 22

pokaz bledy db3 + zapakuj w rar te pliki ktore podmieniles

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: mogę :: zrobić
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku