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

Wysłany: 2018-02-06, 19:11


BoJaKoX

Full Stack Developer






Wiek: 36
Na forum: 3385 dni
Posty: 40

Piwa: 77

Respekt: 50

Siema, jeden problem z wysy?aniem raportu rozwi?za?em ale urodzi?o si? co? innego...
Nie usuwa raportu z "?ciany" dopiero po restarcie zasobu znika no ale to oczywiste. Mo?e kto? wyt?umaczy? czym to jest spowodowane lub/i co? nie dzia?a podsy?am fragment kodu:


 </span><fieldset style="background-color: #191919;border: 1px dashed #3d3d3d; border-radius: 5px 5px 5px 5px; max-width:95%;"><legend><b><img src=http://www.gtao.pl/templates/FIBlack/images/resource.png><span class="genmed"> Kod:</span></b></legend><div style="overflow: auto; overflow-x: auto; overflow-y: auto; width:100%; max-height: 200px;"><table style="width:100%;"><br><td style="font-size: 11px;font-family: Courier New; color: #FFF0B0">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 = findPlayer(plr,cel)
    if not target then
        outputChatBox("Nie znaleziono podanego gracza.", plr, 255, 0, 0)
        return
    end
    local text=table.concat({...}, " ")
    desc = getPlayerName(plr).."("..getElementData(plr,"ID")..") >> "..getPlayerName(target).."("..getElementData(target,"ID").."): "..text
    triggerClientEvent(root, "admin:addReport", resourceRoot, desc, getElementData(target,"ID"))
    outputChatBox("Pomy?lnie wys?ano zg?oszenie na gracza: "..getPlayerName(target), plr)
end)

addCommandHandler("cl", function(plr,cmd,ID,...)
if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
    if not tonumber(ID) then
        outputChatBox("U?yj: /cl <ID> <pow?d usuni?cia>", plr)
        return
    end
    local reason = table.concat({...}, " ")
    local target = findPlayer(plr,ID)
    if target then
        ID = getElementData(target, "ID")
        opis = getPlayerName(target)
    end
    triggerClientEvent(plr, "admin:removeReport", resourceRoot, ID)
    for i,v in ipairs(getElementsByType("player")) do
        if getElementData(plr, "duty") == 1 or getElementData(plr, "duty") == 2 or getElementData(plr, "duty") == 3 then
        if getElementData(v, "duty") == 1 or getElementData(v, "duty") == 2 or getElementData(v, "duty") == 3 then
                outputChatBox(""..getPlayerName(plr).." usun??/??a raport na: "..ID..": "..reason, v, 255, 0, 0)
            end
        end
    end
    end
end)</td></table></div></fieldset><span class="postbody">

Za pomoc stawiam zimne :piwo: i R*

Ostatnio zmieniony przez BoJaKoX 2018-02-06, 19:30, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 19:19


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4189 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1892

Respekt: 460
Respekt: 460

BoJaKoX, Db3 wyst?puje i dodaj tag lua [ lua ] kod [ /lua ]

Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 19:29


BoJaKoX

Full Stack Developer






Wiek: 36
Na forum: 3385 dni
Posty: 40

Piwa: 77

Respekt: 50

We? wyt?umacz,kr?tko i sk?d te DB3 ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 20:56


Eitho







Wiek: 24
Na forum: 3630 dni
Posty: 330
Nick w MP: Eitho

Piwa: 749

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

Je?li jeste? zalogowany w acl (/login nazwa_uzytkownika haslo) i posiadasz uprawnienia admina, to mo?esz wpisa? komend? /debugscript 3. Poka?e ona ewentualne b??dy, ostrze?enia i informacje.

Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 21:10


BoJaKoX

Full Stack Developer






Wiek: 36
Na forum: 3385 dni
Posty: 40

Piwa: 77

Respekt: 50

To tak... DB3 nic nie wywala, ?adnego b??du. Jaki? pomys? co jest nie tak?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 21:32


CjPomarancza

:-)






Wiek: 17
Na forum: 3324 dni
Posty: 90

Piwa: 12

Respekt: 60

Poka? stron? klienta, bo na niej s? eventy powoduj?ce usuni?cie.

Podpis
Pomogłem? Doceń mnie i postaw :piwo: :)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-06, 21:37


BoJaKoX

Full Stack Developer






Wiek: 36
Na forum: 3385 dni
Posty: 40

Piwa: 77

Respekt: 50

Strona Klienta:
 </span><fieldset style="background-color: #191919;border: 1px dashed #3d3d3d; border-radius: 5px 5px 5px 5px; max-width:95%;"><legend><b><img src=http://www.gtao.pl/templates/FIBlack/images/resource.png><span class="genmed"> Kod:</span></b></legend><div style="overflow: auto; overflow-x: auto; overflow-y: auto; width:100%; max-height: 200px;"><table style="width:100%;"><br><td style="font-size: 11px;font-family: Courier New; color: #FFF0B0">addEventHandler("onClientRender", root, function()
if getElementData(localPlayer, "duty") == 1 or getElementData(localPlayer, "duty") == 2 or getElementData(localPlayer, "duty") == 3 then
    local tt={}
    for i,v in ipairs(reportView) do
        if v[1] then table.insert(tt,v[1]) end
    end
    concat=table.concat(tt, "\n")
    dxDrawText(concat, sx*(698+1)/1024, sy*(278+1)/768, sx*(1014+1)/1024, sy*(496+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "right", "top", false, true)
    dxDrawText(concat, sx*(698)/1024, sy*(278)/768, sx*(1014)/1024, sy*(496)/768, tocolor(255, 255, 255, 255), 1.00, "default", "right", "top", false, true)
end
    end)

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

addEvent("admin:addReport", true)
addEventHandler("admin:addReport", root, function(text,id)
    table.insert(reportView, {text,id})
    if #reportView > 20 then
        table.remove(reportView, 1)
    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", root, renderingInfo)
    setTimer(function()
        removeEventHandler("onClientRender", root, renderingInfo)
    end, 5000, 1)
end)</td></table></div></fieldset><span class="postbody">


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-07, 01:06


Toffiaaak.







Wiek: 23
Na forum: 4551 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

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
end)

Powinno pom?c, je?li pomog?o - licz? na reputacj?.

Podpis

Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-07, 15:46


BoJaKoX

Full Stack Developer






Wiek: 36
Na forum: 3385 dni
Posty: 40

Piwa: 77

Respekt: 50

Nie dzia?a :(

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: usuwa :: raportu.
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