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

Wysłany: 2017-03-19, 17:58


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Witam mam GM Pysa wpisuje komend? duty i bicie si? nie odblokowuje

Za pomoc zimneeeeee :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-20, 16:23


Demic

Lua&Mapping






Wiek: 29
Na forum: 4247 dni
Posty: 63
Nick w MP: Demic

Piwa: 620

Respekt: 70

Daj kod.

Podpis
<[email protected]>
warsaw-life.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-03-20, 18:00


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

&#65279;function RGBToHex(red, green, blue, alpha)
    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 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,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(moderatorzy,t)
      end
    end
    end
end


  outputChatBox("Administratorzy RCON:"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
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,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,"#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 RCON'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",true)
            toggleControl(plr,"aim_weapon",true)
            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)


[ Dodano: 2017-03-24, 11:47 ]
Zamykamy temat nie rozwi?zany (brak aktywno?ci)

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Tagi: pys :: wpisuje :: komendę :: duty :: nie :: mogę :: mierzyć :: ani :: bić
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » PYS Wpisuje komendę duty i nie mogę mierzyć ani bić 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