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

Wysłany: 2021-04-01, 10:33


!ryzee

rebornMTA






Wiek: 19
Na forum: 2254 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

Siemka, mam problem. A dok?adnie, to ekipa z mojego serwera ma rangi. Nie wy?wietlaj? si? osoby wgl pod /admins. Nawet ja, na w?a?cicielu.

Kod: s_utility - pystories-admins


local sw,sh guiGetScreenSize()
local screenWscreenH guiGetScreenSize()

function hidePlayerWarning()
    playerWarning=false
end

addEventHandler("onClientRender"root, function()
    if (playerWarningthen
        dxDrawRectangle(screenW 0.2767screenH 0.2669screenW 0.4473screenH 0.4674tocolor(000155), false)
        dxDrawRectangle(screenW 0.2767screenH 0.6914screenW 0.4473screenH 0.0430tocolor(2541515255), true)
        dxDrawText("Otrzyma?e?(a?) ostrze?enie!", (screenW 0.2767) - 1, (screenH 0.6745) - 1, (screenW 0.7240) - 1, (screenH 0.7474) - 1tocolor(000255), 2.00"default""center""center"falsefalsetruefalsefalse)
        dxDrawText("Otrzyma?e?(a?) ostrze?enie!", (screenW 0.2767) + 1, (screenH 0.6745) - 1, (screenW 0.7240) + 1, (screenH 0.7474) - 1tocolor(000255), 2.00"default""center""center"falsefalsetruefalsefalse)
        dxDrawText("Otrzyma?e?(a?) ostrze?enie!", (screenW 0.2767) - 1, (screenH 0.6745) + 1, (screenW 0.7240) - 1, (screenH 0.7474) + 1tocolor(000255), 2.00"default""center""center"falsefalsetruefalsefalse)
        dxDrawText("Otrzyma?e?(a?) ostrze?enie!", (screenW 0.2767) + 1, (screenH 0.6745) + 1, (screenW 0.7240) + 1, (screenH 0.7474) + 1tocolor(000255), 2.00"default""center""center"falsefalsetruefalsefalse)
        dxDrawText("Otrzyma?e?(a?) ostrze?enie!"screenW 0.2767screenH 0.6745screenW 0.7240screenH 0.7474tocolor(254254254255), 2.00"default""center""center"falsefalsetruefalsefalse)
        dxDrawText("Tre??: "..playerWarning..""screenW 0.2840screenH 0.2943screenW 0.7167screenH 0.6693tocolor(255255255255), 3.00"default""center""center"falsefalsetruefalsefalse)
       return
    end
end)

addEvent("onPlayerWarningReceived"true)
addEventHandler("onPlayerWarningReceived"root, function(tresc)
    if source==localPlayer then
        playerWarning=tresc
        setTimer(hidePlayerWarning70001)
        setTimer(playSoundFrontEnd300105)
    end
end)

for k,v in ipairs getElementsByType "object" ) ) do
    if getElementData v"sciana:raportow" then
        scianaplaczu v
    end
    if getElementData(v,"sciana:text"then
        scianatekstu v
    end
end


function isEventHandlerAddedsEventNamepElementAttachedTofunc )
    if 
        typesEventName ) == 'string' and 
        isElementpElementAttachedTo ) and 
        typefunc ) == 'function' 
    then
        local aAttachedFunctions getEventHandlerssEventNamepElementAttachedTo )
        if typeaAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
            for iv in ipairsaAttachedFunctions ) do
                if == func then
                    return true
                end
            end
        end
    end
 
    return false
end


local xtext=nil
local gameView={"Logi Serwerowe:"}
local sx,sy=guiGetScreenSize()
local screenWscreenH guiGetScreenSize()

function renderingInfo()
    dxDrawRectangle(sx*(258)/1024sy*(0)/768sx*(500)/1024sy*(23)/768tocolor(000155), false)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024sy*(0+1)/768sx*(758+1)/1024sy*(23+1)/768tocolor(000255), 1.00"default""center""center"falsetrue)
    dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024sy*(0)/768sx*(758)/1024sy*(23)/768tocolor(25500255), 1.00"default""center""center"falsetrue)
end

function raporcik()
    if getElementData(localPlayer"player:logs"then
    if not getElementData(localPlayer,"player:admin"then return end
    local tt={}
    reportView=getElementData(scianaplaczu,"sciana:raportow")
    for i,c in ipairs(reportView) do
        if c[1then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt"\n")
    dxDrawText(concat:gsub("#%x%x%x%x%x%x",""), sx*(698+1)/1024sy*(278+1)/768sx*(1014+1)/1024sy*(496+1)/768tocolor(000255), 1.00"default""right""top"falsetruefalsetrue)
    dxDrawText(concatsx*(698)/1024sy*(278)/768sx*(1014)/1024sy*(496)/768tocolor(255255255255), 1.00"default""right""top"falsetruefalsetrue)
end
end
addEventHandler("onClientRender"rootraporcik)

addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text)
    table.insert(gameViewtext)    
    if #gameView > 17 then
        table.remove(gameView2)
    end
end)
function raporcik2()
    if getElementData(localPlayer"player:logs"then
    if not getElementData(localPlayer,"player:admin"then return end
    local tt={}
    reportView=getElementData(scianatekstu,"sciana:text")
    for i,c in ipairs(reportView) do
        if c[1then table.insert(tt,c[1]) end
    end
    concat=table.concat(tt"\n")
    dxDrawText(concat:gsub("#%x%x%x%x%x%x",""), sx*(10+1)/1024sy*(279+1)/768sx*(326+1)/1024sy*(497+1)/768tocolor(000255), 1.00"default""left""top"falsetrue)
    dxDrawText(concat:gsub("#%x%x%x%x%x%x",""), sx*(10)/1024sy*(279)/768sx*(326)/1024sy*(497)/768white1.00"default""left""top"falsetrue)
end
end
addEventHandler("onClientRender"rootraporcik2)

function renderingInfo2()
        dxDrawLine((screenW 0.0000) - 1, (screenH * -0.1367) - 1, (screenW 0.0000) - 1screenH 0.0586tocolor(0101254255), 1false)
        dxDrawLine(screenW 1.0000, (screenH * -0.1367) - 1, (screenW 0.0000) - 1, (screenH * -0.1367) - 1tocolor(0101254255), 1false)
        dxDrawLine((screenW 0.0000) - 1screenH 0.0573screenW 1.0000screenH 0.0573tocolor(0101254255), 1false)
        dxDrawLine(screenW 1.0000screenH 0.0586screenW 1.0000, (screenH * -0.1367) - 1tocolor(0101254255), 1false)
        dxDrawRectangle(screenW 0.0000screenH * -0.1380screenW 1.0000screenH 0.1953tocolor(000255), false)
        dxDrawText("Ogloszenie od administracji: "..xtext2:gsub("#%x%x%x%x%x%x","")..""screenW 0.0000screenH 0.0000screenW 1.0000screenH 0.0573tocolor(31168255255), 1.00dxfont0_8"center""center"falsefalsetruefalsefalse)
end

addEvent("admin:rendering"true)
addEventHandler("admin:rendering"root, function(text)
    xtext=text
    if isEventHandlerAdded("onClientRender",root,renderingInfothen
        removeEventHandler "onClientRender"rootrenderingInfo)
    end
    addEventHandler("onClientRender"rootrenderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo)
    end100001)
end)

addEvent("admin:ogl"true)
addEventHandler("admin:ogl"root, function(text)
    xtext2=text
    if isEventHandlerAdded("onClientRender",root,renderingInfo2then
        removeEventHandler "onClientRender"rootrenderingInfo2)
    end
    addEventHandler("onClientRender"rootrenderingInfo2)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo2)
    end100001)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-01, 11:09


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Okej, tylko w tym kodzie nie ma nic powi?zanego z admins?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-01, 14:23


!ryzee

rebornMTA






Wiek: 19
Na forum: 2254 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

To raczej to, haha. Jestem tak zaj?ty i zamy?lony serwerem ?e powali?em kody.

Satan mam pytanko mam jeszcze 2 problemy na serwerze, m?g?bym prosi? o pomoc? Nie chc? pisa? ci?gle na forum. Nada?bym ci rang? itp.

1 problem: Zmienilem pozycje markera wejscia i wyjscia z urzedu. Jedynm problemem jest to, ?e poprostu jak wejde do urzedu to tepa calkowicie mnie gdzie indziej niz podalem kordy w setElementPostion. A jak wychodze, to wychodzi normalnie.

2. Problem, korzystam z podstawy Demusa. Na pierwszy raz mialem napisy na samochodach w salonach a teraz ich nie mam (Typu cena, nazwa auta, pojemnosc itp). I nie wiem jak to naprawic.

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,"TheNoobisty"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 getPremiump(plr,level)
    if getElementData(plr,"TheNoobisty"then return true end
    if level then
        local result=exports["pystories-db"]:dbGet("SELECT * from pystories_premium 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_premium 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,"TheDeerick"then 
    --if not getElementData(v"p:inv"then
      if (getAdmin(v,4)) then
      local t
      local login=getElementData(v,"player:admin")
      if (loginthen
          if (not getPlayerName(v):gsub("#%x%x%x%x%x%x","") == "Rexu"then
        t="["..getElementData(v,"id").."]"..getPlayerName(v):gsub("#%x%x%x%x%x%x","")..""
        table.insert(owner,t)
        end
      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("W?a?ciciele:"plr1420255)
  if (#owner>0) then
    outputChatBox("* " .. table.concat(owner,", "), plr255255255)
  else
    outputChatBox("* Brak."plr255255255)
  end

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

  outputChatBox("Moderatorzy:"plr01020)
  if (#moderatorzy>0) then
    outputChatBox("* " .. table.concat(moderatorzy,", "), plr255255255)
  else
    outputChatBox("* Brak."plr255255255)
  end
end

addCommandHandler("admins"cmd_adminsfalsefalse)


addCommandHandler("tppos", function(plr,cmd,x,y,z)
if getAdmin(plr4) or getAdmin(plr3) or getAdmin(plr2) or getAdmin(plr1then
    x,y,tonumber(x),tonumber(y),tonumber(z)
    if not x or not y or not z then
        outputChatBox("Podaj pozycje x y z!"plr255255255)
        return
    end
    setElementPosition(plr,x,y,z)
    outputChatBox("Przeniesiono!"plr255255255)
end
end)

addCommandHandler("m", function(plr,cmd,cel,x,bantype,...)
    if getAdmin(plrthen
        local reason table.concat({...}, " ")
        if not cel or not tonumber(x) or not bantype or not reason then
            outputChatBox("U?ycie: /m <nick/ID> <ilo??> <m/h/d> <pow?d>"plr)
            return
        end
        local target exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            return outputChatBox("Nie znaleziono podanego gracza."plr255255255)
        end
        
        reason reason..""
        if bantype == "m" or bantype == "h" or bantype == "d" then
            if bantype == "m" then
                exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)"getPlayerSerial(target),reasonx"mute")
            elseif bantype == "h" then
                exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)"getPlayerSerial(target),reasonx"mute")
            elseif bantype == "d" then
                exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)"getPlayerSerial(target),reasonx"mute")
            end
        end
        outputChatBox("* Otrzyma?e?/a? blokad? mo?liwo?ci pisania na czacie od administracji! Od: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..""target255,0,0)
        outputChatBox("* Pow?d: "..reason..""target255,0,0)
        triggerEvent("save:player",root,target)
        triggerEvent("load:player",root,target)
        setElementData(target"mute:player"true)
        triggerClientEvent(root"admin:rendering"root"Gracz "..getPlayerName(target).." zosta?/a wyciszony/a przez "..getPlayerName(plr)..", pow?d: "..reason.." (".... bantype..")")
    end
end)

addCommandHandler("um", function(plr,cmd,cel)
    if getAdmin(plrthen
        if not cel then
            outputChatBox("* U?ycie: /um <nick/ID> "plr)
            return
        end
        local target=exports["pystories-core"]:findPlayer(plr,cel)
        if not target then
            return
        end
        setElementData(target"mute:player"false)
        local query=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","mute"getPlayerSerial(target))
        local result=exports["DB"]:pobierzWyniki(query)
        if (resultthen
            exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?""mute"getPlayerSerial(target))
            outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Ci mo?liwo?? pisania!"target02550)
        else
            outputChatBox("* "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada blokady mute!"plr02550)
        end
    end
end)

addCommandHandler("schowaj", function(plr,cmd,id)
if getAdmin(plrthen
    if not id or not tonumber(idthen
        outputChatBox("* Podaj id pojazdu!"plr25500)
        return
    end
    exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1,tp_to_parking=? WHERE id=?",getPlayerName(plr), id)
    for i,v in ipairs(getElementsByType("vehicle")) do
        if getElementData(v,"vehicle:id") == tonumber(idthen
        exports["pystories-vehicles"]:onSaveVehicle(v)
        destroyElement(v)
        outputChatBox("* Pojazd zosta? przeniesiony do przechowywalni!"plr02550)
        end
    end
end
end)

addCommandHandler("gleba", function(plr,cmd,cel,value)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,2) or getAdmin(plr,1then
        local pojazd getPedOccupiedVehicle(plr)
        local id getElementData(pojazd,"vehicle:id")
        outputChatBox("* Zglebi?e?/a?  pojazd!."plr)
        setElementData(pojazd,"glebay",true)
        setVehicleHandling(pojazd"suspensionLowerLimit"0.01)
    end
end)

addCommandHandler("logs", function(plr,cmd,cel,value)
    if getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,2) or getAdmin(plr,1then
        if not getElementData(plr"player:logs"then
            setElementData(plr"player:logs"true)
        else
            setElementData(plr"player:logs"false)
        end
    end
end)

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",""))
            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",""))
            setElementData(plr"player:wlasciciel"true)
            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",""))
            setElementData(plr"player:wlasciciel"true)
            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",""))
            setElementData(plr"player:wlasciciel"true)
            setElementData(plr"player:wlasciciell"true)
            destroyBlipsAttachedTo(plr)
            createBlipAttachedTo(plr021420255)
            end
            setElementData(plr,"player:admin",true)
            outputChatBox("* Aby w??czy? logi i list? report?w wpisz /logs."plr)
            setElementData(plr,"player:ucho",true)
        else
            takeWeapon(plr,22)
            toggleControl(plr,"fire",false)
            toggleControl(plr,"aim_weapon",false)
            removeElementData(plr,"player:admin")
            removeElementData(plr,"player:level")
            setElementData(plr"player:wlasciciell"false)
            setElementData(plr,"player:ucho",false)
            setElementData(plr"player:wlasciciel"false)
            setPlayerName(plr,getElementData(plr,"last:nick"))
            destroyBlipsAttachedTo(plr)
            createBlipAttachedTo(plr02255255255)
        end
    else
        outputChatBox("* Nie posiadasz uprawnie?."plr25500)
    end
end)


addCommandHandler("dutysilent", function(plr,cmd)
    if getAdmin(plrthen
        if not getElementData(plr,"player:admin"then
            toggleControl(plr,"fire",true)
            toggleControl(plr,"aim_weapon",true)
            setElementData(plr"player:admin"true)
        end
    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 > 15 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 getElementData(plr,"player:sid"then return end
    if not cel then
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        return
    end
    local text=table.concat({...}, " ")
    if not text then return end
    desc="[#FF9C00"..getElementData(plr,"id").."#ffffff] #FF9C00"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."#ffffff >> [#ff0000"..getElementData(target,"id").."#ffffff] #ff0000"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."#ffffff: "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(plr,"id"))
    outputChatBox("&#9432; #ffffff Wys?ano zg?oszenie"plr0144255true)

end)

addCommandHandler("report", function(plr,cmd,cel,...)
    if not getElementData(plr,"player:sid"then return end
    if not cel then
        return
    end
    local target=exports["pystories-core"]:findPlayer(plr,cel)
    if not target then
        return
    end
    local text=table.concat({...}, " ")
    if not text then return end
    desc="[#FF9C00"..getElementData(plr,"id").."#ffffff] #FF9C00"..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."#ffffff >> [#ff0000"..getElementData(target,"id").."#ffffff] #ff0000"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."#ffffff: "..text:gsub("#%x%x%x%x%x%x","")
    triggerEvent("admin:addReport"resourceRootdescgetElementData(plr,"id"))
    outputChatBox("&#9432; #ffffff Wys?ano zg?oszenie"plr0144255true)

end)

addCommandHandler("cl", function(plr,cmd,id,...)
    if not getAdmin(plrthen
        return
    end

    local reason table.concat({...}, " ")

    if not id then return end
    if not reason then return end
    
    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


    if not reason then
    reason "Brak"
    end

    for i,v in ipairs(getElementsByType("player")) do
        if getElementData(v,"player:admin"then
                triggerEvent("admin:removeReport"resourceRootid)
                local raporcik getElementData(plr"admin:reporty") or 0
                outputChatBox("&#9432; #ffffff "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." rozpatrzy?/a zg?oszenie gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..". Odpowied?: "..reason..""v0144255true)
        end
    end


    outputChatBox("&#9432; #ffffff Twoje zg?oszenie zosta?o przyj?te przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..""target0144255true)
    outputChatBox("&#9432; #ffffff Odpowied?: "..reason..""target0144255true)

end)


Komentarz Shuffle dodany 2021-04-02, 10:19Pomagamy tylko na forum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-02, 07:53


_jvneczek







Wiek: 22
Na forum: 4326 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

1. poka? kod to ci powiem kt?re kordy od czego s?
2. skrypt na 3d texty

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-02, 10:20


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Po wpisaniu /admins pokazuje ci ?e Brak ka?dej rangi czy nie pokazuje Ci w og?le nic lub wywala b??d?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-02, 12:54


!ryzee

rebornMTA






Wiek: 19
Na forum: 2254 dni
Posty: 111
Nick w MP: drakovskyy

Piwa: 55

Respekt: 60

"satan_" napisał/a:

1. poka? kod to ci powiem kt?re kordy od czego s?
2. skrypt na 3d texty


1. Podam nizej.
2. Skrypt na 3d texty mam. Serwer si? wy???zy? przypadkowo. W??czy?em i nie ma napis?w, 3d texty wlaczone.

createBlip(-1954.36,1343.51,7.1939,2,0,0,0,0,0,275)

wejscie_marker createMarker (-1954.36,1343.517.19-1"cylinder"1.52552000150)
wyjscie_marker createMarker (-1969.82,1377.48741.53-1"cylinder"1.52552000150)
setElementDimension(wyjscie_marker0)
setElementInterior(wyjscie_marker0)

addEventHandler("onMarkerHit"wejscie_marker, function(elmd)
    if isPedInVehicle(elthen return end
    fadeCamera(el ,false)
    setElementFrozen(eltrue)
    setTimer(function ()
    outputChatBox"* Patrzysz na godziny otwarcia, i wchodzisz do Urz?du."el)
    setElementDimension(el1)
    setElementInterior(el3)
    setElementPosition(el, -1965.82,1377.20,741.53)
    setElementFrozen(elfalse)
    showPlayerHudComponent(el"radar"false)
    fadeCamera(eltrue)
    end15001)
end)

addEventHandler("onMarkerHit"wyjscie_marker, function(elmd)
    if isPedInVehicle(elthen return end
    fadeCamera(el ,false)
    setElementFrozen(eltrue)
    setTimer(function ()
    outputChatBox("* Za?atwi?e? swoje sprawy, i wychodzisz z Urz?du."el)
    setElementDimension(el0)
    setElementInterior(el0)
    setElementPosition(el, -1954.21,1341.84,7.19)
    setElementFrozen(elfalse)
    showPlayerHudComponent(el"radar"true)
    fadeCamera(eltrue)
    end15001)
end)


[ Dodano: 2021-04-02, 12:54 ]
"Shuffle" napisał/a:

Po wpisaniu /admins pokazuje ci ?e Brak ka?dej rangi czy nie pokazuje Ci w og?le nic lub wywala b??d?


Na ka?dej randze pisze "Brak." lecz jestem na duty i nic. :p

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-04-02, 13:53


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poka? komend? na /duty oraz funkcj? exportowan? getAdmins

Postaw piwo autorowi tego posta
 

 
Tagi: adminsy.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Adminsy. 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