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

Wysłany: 2017-09-03, 12:09


Qbik1337







Wiek: 30
Na forum: 3207 dni
Posty: 18
Nick w MP: Danio

Piwa: 133

Respekt: 50

Witam , otoz mam taki problem jak wchodze na duty to nie wyskakuje mi napis Lista Raportow i jak np wysle raport na siebie to tez nie pokazuje mojego raporta i komenda cl tez nie dzia?a B?EDOW W DB3 NIE MA

Prosze o pomoc za pomoc :piwo: + R*


function jestRCONem(gracz)
if getElementData(gracz"adminduty") == 3 then return true end
end


function jestADMINem(gracz)
if getElementData(gracz"amodduty") == 2 then return true end
end


function jestModem(gracz)
if getElementData(gracz"samodduty") == 1 then return true end
end


function adm (source)
local accountName=getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accountNameaclGetGroup("Admin")) then
if getElementData(source"adminduty"truethen
setElementData(source"adminduty"false)
takeAllWeapons(source)
outputChatBox("Zwolni?e? si? z rangi administratora RCON"source25500)
removeElementData(source,"Praca")
triggerClientEvent("okno:dutyoff",source,source)
takeWeapon source22 )
else
outputChatBox("Zalogowa?e? si? jako Administrator RCON :)"source25500)
            local nazwa "Administrator RCON"
            local r,g,22000 
            setElementData(source,"Praca",nazwa)
            setElementData(source,"Praca:r",r) 
            setElementData(source,"Praca:g",g)     
            setElementData(source,"Praca:b",b)  
            triggerClientEvent("okno:dutyon",source,source)
setElementData(source"adminduty"true)  
setPlayerNametagColor source2200)       
giveWeapon source2210000000)
end
end
end
addCommandHandler('dutyadm'adm)



function adm (source)
local accountName=getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accountNameaclGetGroup("SuperModerator")) then
if getElementData(source"amodduty"truethen
setElementData(source"amodduty"false)
outputChatBox("Zwolni?e? si? z rangi Administrator"source25500)
removeElementData(source,"Praca")
triggerClientEvent("okno:dutyoff",source,source)
takeWeapon source22 )
else
outputChatBox("Zalogowa?e? si? jako Administrator :)"source25500)
            local nazwa "Administrator"
            local r,g,25500 
            setElementData(source,"Praca",nazwa)
            setElementData(source,"Praca:r",r) 
            setElementData(source,"Praca:g",g)     
            setElementData(source,"Praca:b",b)  
            triggerClientEvent("okno:dutyon",source,source)
setPlayerNametagColor source2550)    
setElementData(source"amodduty"true)    
giveWeapon source2210000000)  
end
end
end
addCommandHandler('duty'adm)

function adm (source)
local accountName=getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..accountNameaclGetGroup("Moderator")) then
if getElementData(source"samodduty"truethen
setElementData(source"samodduty"false)
outputChatBox("Zwolni?e? si? z rangi Supporter"source25500)
takeWeapon source22 )
triggerClientEvent("okno:dutyoff",source,source)
removeElementData(source,"Praca")
else
outputChatBox("Zalogowa?e? si? jako Supporter :)"source25500)
triggerClientEvent("okno:dutyon",source,source)
            local nazwa "Support"
            local r,g,071255 
            setElementData(source,"Praca",nazwa)
            setElementData(source,"Praca:r",r) 
            setElementData(source,"Praca:g",g)     
            setElementData(source,"Praca:b",b)  
            setElementData(source"samodduty"true)  
            setPlayerNametagColor source071255 giveWeapon source2210000000)            
end
end
end
addCommandHandler('duty'adm)

function znajdzGracza(plrcel)
    local target nil
    if tonumber(cel) ~= nil then
        target getElementByID("p"..cel)
    else
        for _,gracze in ipairs(getElementsByType("player")) do
            if string.find(string.gsub(getPlayerName(gracze):lower(), "#%x%x%x%x%x%x"""), cel:lower(), 1truethen
                if target then
                    outputChatBox("* Znaleziono wi?cej graczy o takim nicku, podaj wi?cej liter!"plr)
                    return nil
                end
                target gracze
            end
        end
    end
    return target
end



-----


addCommandHandler("raport", function(plr,cmd,cel,...)
    if not cel then
        outputChatBox("U?yj: /raport <kawa?ek nick'u> <pow?d>"plr)
        return
    end
    local target znajdzGracza(plr,cel)
    if not target then
        outputChatBox("Nie znaleziono podanego gracza."plr25500)
        return
    end
    local text=table.concat({...}, " ")
    desc getPlayerName(plr).."("..getElementData(plr,"id")..") >> "..getPlayerName(target).."("..getElementData(target,"id").."): "..text
    triggerClientEvent(root"admin:addReport"rootdescgetElementData(target,"id"))
    outputChatBox("Pomy?lnie wys?ano zg?oszenie na gracza: "..getPlayerName(target), plr)
end)

addCommandHandler("cl", function(plr,cmd,id,...)
if getElementData(plr"adminduty") == or getElementData(plr"adminduty") == or getElementData(plr"adminduty") == 3 then
    if not tonumber(idthen
        outputChatBox("U?yj: /cl <ID> <pow?d usuni?cia>"plr)
        return
    end
    local reason table.concat({...}, " ")
    local target znajdzGracza(plrid)
    if target then
        id getElementData(target"id")
        opis getPlayerName(target)
    end
    triggerClientEvent(plr"admin:removeReport"rootid)
    for i,v in ipairs(getElementsByType("player")) do
        if getElementData(plr"adminduty") == or getElementData(plr"adminduty") == or getElementData(plr "adminduty") == 3 then
        if getElementData(v"adminduty") == or getElementData(v"adminduty") == or getElementData(v"adminduty") == 3 then
                outputChatBox(""..getPlayerName(plr).." usun??/??a raport na: "..opis.."/"..id..": "..reasonv25500)
            end
        end
    end
    end
end)

addCommandHandler('e', function(plr,cmd, ...)
    if not (...) then return end
    local msg=table.concat({...}, " ")
    if getElementData(plr"adminduty") == 3 then  
    end
    if getElementData(plr"amodduty") == 2 then
    end
    if getElementData(plr"samodduty") == 1 then
    end
    for _p in pairs(getElementsByType('player')) do
        if getElementData(p"adminduty"then
            outputChatBox("[CE] "..getPlayerName(plr).." ("..tonumber(getElementData(plr,"id"))..") ".." : "..msg,p,255,1700,true)
        end
    end
end)

addCommandHandler("ustaw.klatke", function(plr)
    if getElementData(plr"adminduty") == or getElementData(plr"amoduty") == or getElementData(plr"samoduty") == 2 then
        local x,y,z=getElementPosition(plr)
        local dim=getElementDimension(plr)
        local int=getElementInterior(plr)

        local object=createObject(971x,y,z-0.92700180)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        local object=createObject(971x,y,z+62700180)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        local object=createObject(971x,y+3.5,z+2.5000)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        local object=createObject(971x-4.5,y,z+2.500270)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        local object=createObject(971x,y-3.5,z+2.500180)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        local object=createObject(971x+4,y,z+2.500270)
        setElementData(object,"owner",getPlayerName(plr))
        setElementDimension(object,dim)
        setElementInterior(object,int)

        outputChatBox("* Stworzy?es/a? klatk?."plr)
    end
end)

addCommandHandler("usun.klatke", function(plr)
    if getElementData(plr"dutyadmin") == or getElementData(plr"amoduty") == or getElementData(plr"samoduty") == 2 then
        for i,v in ipairs(getElementsByType("object")) do
            if getElementData(v,"owner") == getPlayerName(plrthen
                destroyElement(v)
            end
        end
    end
end)


[PO STRONIE CLIENTA]

addCommandHandler("gp",function(plr)
    outputChatBox("Interior: " .. getElementInterior(localPlayer) .. " Dimension: " .. getElementDimension(localPlayer))
    local x,y,getElementPosition(localPlayer)
    local xr,yr,zr getElementRotation(localPlayer)
    p=string.format("%.2f,%.2f,%.2f",x,y,z)
    setClipboard(p)
    outputChatBox("Pozycja gracza: {" ..p.."},")
    --outputChatBox("Pozycja Rotacji: "..xr..", " ..yr..", " ..zrplr)
    local veh=getPedOccupiedVehicle(localPlayer)
    if veh then
        local x,y,z=getElementPosition(veh)
        local rx,ry,rz=getElementRotation(veh)
        local ID getElementModel veh )
        local Model getVehicleName veh )
        p=string.format("%.2f,%.2f,%.2f,%.1f,%.1f,%.1f",x,y,z,rx,ry,rz)
        setClipboard(p)
        outputChatBox("*Pozycja pojazdu:("..p.."),")
        outputChatBox("*Nazwa Pojazdu:"..Model.." \n*ID Pojazdu "..ID..".")
    end
end)

addCommandHandler("gp2",function(plr)
    outputChatBox("Interior: " .. getElementInterior(localPlayer) .. " Dimension: " .. getElementDimension(localPlayer))
    local x,y,getElementPosition(localPlayer)
    local xr,yr,zr getElementRotation(localPlayer)
    p=string.format("%.2f,%.2f,%.2f",x,y,z)
    setClipboard(p)
    outputChatBox("Pozycja gracza: " ..p.." ")
    outputChatBox("Pozycja rotacji: "..xr..", " ..yr..", " ..zrplr)
    local veh=getPedOccupiedVehicle(localPlayer)
    if veh then
        local x,y,z=getElementPosition(veh)
        local rx,ry,rz=getElementRotation(veh)
        local ID getElementModel veh )
        local Model getVehicleName veh )
        p=string.format("%.2f,%.2f,%.2f,%.1f,%.1f,%.1f",x,y,z,rx,ry,rz)
        setClipboard(p)
        outputChatBox("*Pozycja pojazdu:("..p.."),")
        outputChatBox("*Nazwa Pojazdu:"..Model.." \n*ID Pojazdu "..ID..".")
    end
end)


local xtext=nil
local gameView={" "}
local reportView={"Lista raport?w:"}
local sx,sy=guiGetScreenSize()

addEventHandler("onClientRender"root, function()
if getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == 3 then
    concat=table.concat(gameView"\n")
    dxDrawText(concatsx*(10+1)/1024sy*(279+1)/768sx*(326+1)/1024sy*(497+1)/768tocolor(000255), 1.00"default""left""top"falsetrue)
    dxDrawText(concatsx*(10)/1024sy*(279)/768sx*(326)/1024sy*(497)/768white1.00"default""left""top"falsetrue)
end
    end)


function renderingInfo()
    --dxDrawRectangle(sx*(258)/1024sy*(0)/768sx*(500)/1024sy*(23)/768tocolor(000155), false)
     dxDrawRectangle(sx*(843)/1280sy*(536)/600sx*(427)/1280sy*(28)/600tocolor(000155), false)
    --dxDrawText(xtextsx*(258+1)/1024sy*(0+1)/768sx*(758+1)/1024sy*(23+1)/768tocolor(000255), 1.00"default""center""center"falsetrue)
    --dxDrawText(xtextsx*(258)/1024sy*(0)/768sx*(758)/1024sy*(23)/768tocolor(25500255), 1.00"default""center""center"falsetrue)
    dxDrawText(xtextsx*(860+1)/1280sy*(542+1)/600sx*(1260+1)/1280sy*(560+1)/600tocolor(000255), 1.00"default""left""top"falsefalsefalsefalsefalse)
    dxDrawText(xtextsx*(860)/1280sy*(542)/600sx*(1260)/1280sy*(560)/600tocolor(25500255), 1.00"default""left""top"falsefalsefalsefalsefalse)
    dxDrawImage(sx*(1242)/1280sy*(541)/600sx*(24)/1280sy*(19)/600":dutyAdministracji/img/mark.png"000tocolor(255255255255), false)
end

addEventHandler("onClientRender"root, function()
if getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == 3 then
    local tt={}
    for i,v in ipairs(reportView) do
        if v[1then table.insert(tt,v[1]) end
    end
    concat=table.concat(tt"\n")
    dxDrawText(concatsx*(698+1)/1024sy*(278+1)/768sx*(1014+1)/1024sy*(496+1)/768tocolor(000255), 1.00"default""right""top"falsetrue)
    dxDrawText(concatsx*(698)/1024sy*(278)/768sx*(1014)/1024sy*(496)/768tocolor(255255255255), 1.00"default""right""top"falsetrue)
end
    end)

addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text)
    table.insert(gameViewtext)
    if #gameView > 20 then
        table.remove(gameView1)
    end
end)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 20 then
        table.remove(reportView1)
    end
end)

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

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


Ostatnio zmieniony przez Qbik1337 2017-09-03, 12:16, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-03, 12:15


Demossek

Chyba ty...






Wiek: 21
Na forum: 3375 dni
Posty: 24
Nick w MP: Demossek



Respekt: 50

Jaka masz paczke ??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-03, 13:17


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Jak tutaj zmieni?e? elementdaty to zmie? je w raportach

function jestRCONem(gracz)
if getElementData(gracz"adminduty") == 3 then return true end
end


function jestADMINem(gracz)
if getElementData(gracz"amodduty") == 2 then return true end
end


function jestModem(gracz)
if getElementData(gracz"samodduty") == 1 then return true end
end


[ Dodano: 2017-09-03, 13:22 ]
Ot?? t? linijk?:

if getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == or getElementData(localPlayer"adminduty") == 3 then


Podmieniasz na:
if getElementData(localPlayer"adminduty") == or getElementData(localPlayer"amoduty") == or getElementData(localPlayer"samoduty") == 1 then


(pisane z telefonu mog? by? b??dy

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-03, 14:09


Qbik1337







Wiek: 30
Na forum: 3207 dni
Posty: 18
Nick w MP: Danio

Piwa: 133

Respekt: 50

Dalej nic ... a b??d?w w db3 tez nie ma

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-03, 21:01


Demossek

Chyba ty...






Wiek: 21
Na forum: 3375 dni
Posty: 24
Nick w MP: Demossek



Respekt: 50

ekhm pomoge ale powiedz paczkr

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-04, 20:39


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Demossek, Po co ci paczka? Mo?e to autorskie? ( Wiem ?e nie ) Lua nie kr?ci sie wok?? Paczek OGRPG/ Xzyyrp czy jeszcze co tam jest!

Co do tematu:
Zobacz tak:



addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 20 then
        table.remove(reportView1)
    end
end)



local xtext=nil
local gameView={" "}
local reportView={"Lista raport?w:"}
local sx,sy=guiGetScreenSize()

addEventHandler("onClientRender"root, function()
    if not getElementData(localPlayer,"amodduty"then return end
    concat=table.concat(gameView"\n")
    dxDrawText(concatsx*(10+1)/1024sy*(279+1)/768sx*(326+1)/1024sy*(497+1)/768tocolor(000255), 1.00"default""left""top"falsetrue)
    dxDrawText(concatsx*(10)/1024sy*(279)/768sx*(326)/1024sy*(497)/768white1.00"default""left""top"falsetrue)
    end)


function renderingInfo()
    --dxDrawRectangle(sx*(258)/1024sy*(0)/768sx*(500)/1024sy*(23)/768tocolor(000155), false)
     dxDrawRectangle(sx*(843)/1280sy*(536)/600sx*(427)/1280sy*(28)/600tocolor(000155), false)
    --dxDrawText(xtextsx*(258+1)/1024sy*(0+1)/768sx*(758+1)/1024sy*(23+1)/768tocolor(000255), 1.00"default""center""center"falsetrue)
    --dxDrawText(xtextsx*(258)/1024sy*(0)/768sx*(758)/1024sy*(23)/768tocolor(25500255), 1.00"default""center""center"falsetrue)
    dxDrawText(xtextsx*(860+1)/1280sy*(542+1)/600sx*(1260+1)/1280sy*(560+1)/600tocolor(000255), 1.00"default""left""top"falsefalsefalsefalsefalse)
    dxDrawText(xtextsx*(860)/1280sy*(542)/600sx*(1260)/1280sy*(560)/600tocolor(25500255), 1.00"default""left""top"falsefalsefalsefalsefalse)
    dxDrawImage(sx*(1242)/1280sy*(541)/600sx*(24)/1280sy*(19)/600":dutyAdministracji/img/mark.png"000tocolor(255255255255), false)
end

addEventHandler("onClientRender"root, function()
    if not getElementData(localPlayer,"amodduty"then return end
    local tt={}
    for i,v in ipairs(reportView) do
        if v[1then table.insert(tt,v[1]) end
    end
    concat=table.concat(tt"\n")
    dxDrawText(concatsx*(698+1)/1024sy*(278+1)/768sx*(1014+1)/1024sy*(496+1)/768tocolor(000255), 1.00"default""right""top"falsetrue)
    dxDrawText(concatsx*(698)/1024sy*(278)/768sx*(1014)/1024sy*(496)/768tocolor(255255255255), 1.00"default""right""top"falsetrue)
    end)

addEvent("admin:addText"true)
addEventHandler("admin:addText"root, function(text)
    table.insert(gameViewtext)
    if #gameView > 20 then
        table.remove(gameView1)
    end
end)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 20 then
        table.remove(reportView1)
    end
end)

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

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


Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Tagi: raporty
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Raporty Odpowiedz do tematu

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