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

Wysłany: 2017-08-17, 15:08


Vintage







Wiek: 23
Na forum: 3554 dni
Posty: 64

Piwa: 1

Respekt: 45,8

witam , mianowicie mam taki b??d ?e nie pokazuje listy report?w ani pm , pw

DB3 : http://imgur.com/a/oF9yK

28 linijka :
concat=table.concat(tt"\n")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 15:16


neku^







Wiek: 24
Na forum: 3521 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5

Podaj wi?cej kodu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 15:22


Vintage







Wiek: 23
Na forum: 3554 dni
Posty: 64

Piwa: 1

Respekt: 45,8

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 reportView={"Lista raport?w"}
local sx,sy=guiGetScreenSize()
local screenW,screenH guiGetScreenSize()

addEventHandler("onClientRender"root, function()
    if not getElementData(localPlayer,"player:admin"then return end
    concat=table.concat(tt"\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(screenW 0.0000screenH 0.9681screenW 1.0000screenH 0.0319tocolor(000150), false)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000+1screenH 0.9694+1screenW 0.9961+1screenH 1.0000+1tocolor(000255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000screenH 0.9694screenW 0.9961screenH 1.0000tocolor(25500255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end
        
function ogloszeniaPremek()
    local ruszanie=math.sin(getTickCount()/300)*5
        dxDrawRectangle(screenW 0.0132screenH 0.4010+ruszaniescreenW 0.2943screenH 0.0677tocolor(0,0,0100), false)
        dxDrawText(xtext,screenW 0.0205screenH 0.4063+ruszaniescreenW 0.2855screenH 0.4609tocolor(255255255255), 1.00"default-bold""center""top"falsetruefalsefalsefalse)
end

function powiadomienia()
   dxDrawText(xtextscreenW 0.2862+1screenH 0.8073+1screenW 0.7130+1screenH 0.8529+1tocolor(000255), 1.3"clear""center""top"falsetruefalsefalsefalse)
   dxDrawText(xtextscreenW 0.2862screenH 0.8073screenW 0.7130screenH 0.8529tocolor(255255255255), 1.3"clear""center""top"falsetruefalsefalsefalse)
end

addEventHandler("onClientRender"root, function()
    if not getElementData(localPlayer,"player:admin"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 > 10 then
        table.remove(gameView1)
    end
end)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 10 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
    if isEventHandlerAdded("onClientRender",root,hudthen
        removeEventHandler "onClientRender"roothud)
    end
    addEventHandler("onClientRender"rootrenderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo)
    end50001)
end)

addEvent("ogloszenia:premium"true)
addEventHandler("ogloszenia:premium"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootogloszeniaPremek)
    setTimer(function()
        removeEventHandler("onClientRender"rootogloszeniaPremek)
    end72501)
end)

addEvent("dodaj:powiadomienie"true)
addEventHandler("dodaj:powiadomienie"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootpowiadomienia)
    setTimer(function()
        removeEventHandler("onClientRender"rootpowiadomienia)
    end50001)
end)
dbn69,

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 16:24


Gpla

Loading...






Wiek: 26
Na forum: 3853 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3

Spr?buj tak

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 reportView={"Lista raport?w"}
local sx,sy=guiGetScreenSize()
local screenW,screenH guiGetScreenSize()

addEventHandler("onClientRender"root, function(tt)
    if not getElementData(localPlayer,"player:admin"then return end
    concat=table.concat(tt"\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(screenW 0.0000screenH 0.9681screenW 1.0000screenH 0.0319tocolor(000150), false)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000+1screenH 0.9694+1screenW 0.9961+1screenH 1.0000+1tocolor(000255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000screenH 0.9694screenW 0.9961screenH 1.0000tocolor(25500255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end
        
function ogloszeniaPremek()
    local ruszanie=math.sin(getTickCount()/300)*5
        dxDrawRectangle(screenW 0.0132screenH 0.4010+ruszaniescreenW 0.2943screenH 0.0677tocolor(0,0,0100), false)
        dxDrawText(xtext,screenW 0.0205screenH 0.4063+ruszaniescreenW 0.2855screenH 0.4609tocolor(255255255255), 1.00"default-bold""center""top"falsetruefalsefalsefalse)
end

function powiadomienia()
   dxDrawText(xtextscreenW 0.2862+1screenH 0.8073+1screenW 0.7130+1screenH 0.8529+1tocolor(000255), 1.3"clear""center""top"falsetruefalsefalsefalse)
   dxDrawText(xtextscreenW 0.2862screenH 0.8073screenW 0.7130screenH 0.8529tocolor(255255255255), 1.3"clear""center""top"falsetruefalsefalsefalse)
end

addEventHandler("onClientRender"root, function(tt)
    if not getElementData(localPlayer,"player:admin"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 > 10 then
        table.remove(gameView1)
    end
end)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 10 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
    if isEventHandlerAdded("onClientRender",root,hudthen
        removeEventHandler "onClientRender"roothud)
    end
    addEventHandler("onClientRender"rootrenderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo)
    end50001)
end)

addEvent("ogloszenia:premium"true)
addEventHandler("ogloszenia:premium"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootogloszeniaPremek)
    setTimer(function()
        removeEventHandler("onClientRender"rootogloszeniaPremek)
    end72501)
end)

addEvent("dodaj:powiadomienie"true)
addEventHandler("dodaj:powiadomienie"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootpowiadomienia)
    setTimer(function()
        removeEventHandler("onClientRender"rootpowiadomienia)
    end50001)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 18:06


Vintage







Wiek: 23
Na forum: 3554 dni
Posty: 64

Piwa: 1

Respekt: 45,8

Gpla, ten sam b??d :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 18:58


Gpla

Loading...






Wiek: 26
Na forum: 3853 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3


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 reportView={"Lista raport?w"}
local sx,sy=guiGetScreenSize()
local screenW,screenH guiGetScreenSize()

addEventHandler("onClientRender"root, function(...)
    if not getElementData(localPlayer,"player:admin"then return end
    concat=table.concat(tt, { ... }, "\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(screenW 0.0000screenH 0.9681screenW 1.0000screenH 0.0319tocolor(000150), false)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000+1screenH 0.9694+1screenW 0.9961+1screenH 1.0000+1tocolor(000255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
     dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), screenW 0.0000screenH 0.9694screenW 0.9961screenH 1.0000tocolor(25500255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end
        
function ogloszeniaPremek()
    local ruszanie=math.sin(getTickCount()/300)*5
        dxDrawRectangle(screenW 0.0132screenH 0.4010+ruszaniescreenW 0.2943screenH 0.0677tocolor(0,0,0100), false)
        dxDrawText(xtext,screenW 0.0205screenH 0.4063+ruszaniescreenW 0.2855screenH 0.4609tocolor(255255255255), 1.00"default-bold""center""top"falsetruefalsefalsefalse)
end

function powiadomienia()
   dxDrawText(xtextscreenW 0.2862+1screenH 0.8073+1screenW 0.7130+1screenH 0.8529+1tocolor(000255), 1.3"clear""center""top"falsetruefalsefalsefalse)
   dxDrawText(xtextscreenW 0.2862screenH 0.8073screenW 0.7130screenH 0.8529tocolor(255255255255), 1.3"clear""center""top"falsetruefalsefalsefalse)
end

addEventHandler("onClientRender"root, function(...)
    if not getElementData(localPlayer,"player:admin"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 > 10 then
        table.remove(gameView1)
    end
end)

addEvent("admin:addReport"true)
addEventHandler("admin:addReport"root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 10 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
    if isEventHandlerAdded("onClientRender",root,hudthen
        removeEventHandler "onClientRender"roothud)
    end
    addEventHandler("onClientRender"rootrenderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender"rootrenderingInfo)
    end50001)
end)

addEvent("ogloszenia:premium"true)
addEventHandler("ogloszenia:premium"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootogloszeniaPremek)
    setTimer(function()
        removeEventHandler("onClientRender"rootogloszeniaPremek)
    end72501)
end)

addEvent("dodaj:powiadomienie"true)
addEventHandler("dodaj:powiadomienie"root, function(text)
    xtext=text
    addEventHandler("onClientRender"rootpowiadomienia)
    setTimer(function()
        removeEventHandler("onClientRender"rootpowiadomienia)
    end50001)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 19:15


neku^







Wiek: 24
Na forum: 3521 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5

Gpla, : facepalm: co Ty kminisz? to wogole nie ma prawa dzia?a?, na ogrpg si? nie znam wi?c nie pomog?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 19:18


Gpla

Loading...






Wiek: 26
Na forum: 3853 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3

dbn69, pr?buje mu pom?c, te? na ogrpg nie za bardzo si? znam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-17, 19:21


neku^







Wiek: 24
Na forum: 3521 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5

Na si?? nie ma co pomaga? polecam poczyta? o argumentach funkcji bo to nigdy nie zadzia?a:


addEventHandler("onClientRender"root, function(...)
    if not getElementData(localPlayer,"player:admin"then return end
    concat=table.concat(tt, { ... }, "\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)


Postaw piwo autorowi tego posta
 

 
Tagi: dutyadmin
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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