Wysłany: 2018-02-06, 19:11
BoJaKoX
Full Stack Developer
Wiek: 36 Na forum: 3244 dni Posty: 40
Piwa : 77
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 i
Ostatnio zmieniony przez BoJaKoX 2018-02-06, 19:30, w całości zmieniany 1 raz
Wysłany: 2018-02-06, 19:19
Barcioo
Kiedyś to było ST
Wiek: 26 Na forum: 4049 dni Posty: 458
Nick w MP: Bartek.
Piwa : 1887
BoJaKoX , Db3 wyst?puje i dodaj tag lua [ lua ] kod [ /lua ]
Podpis
Kanał Youtube;
A tu zapraszam
[you]
, pomogłem Ci? Wynagrodź mnie
SUPPORT TEAM - 2016-09-03 do 2018-05-25
Test Mod - 2018-05-25
1k dni na Forum - 2018-01-28
GG: 62111935
Wysłany: 2018-02-06, 19:29
BoJaKoX
Full Stack Developer
Wiek: 36 Na forum: 3244 dni Posty: 40
Piwa : 77
We? wyt?umacz,kr?tko i sk?d te DB3 ?
Wysłany: 2018-02-06, 20:56
Eitho
Wiek: 24 Na forum: 3489 dni Posty: 330
Nick w MP: Eitho
Piwa : 746
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.
Wysłany: 2018-02-06, 21:10
BoJaKoX
Full Stack Developer
Wiek: 36 Na forum: 3244 dni Posty: 40
Piwa : 77
To tak... DB3 nic nie wywala, ?adnego b??du. Jaki? pomys? co jest nie tak?
Wysłany: 2018-02-06, 21:32
CjPomarancza
:-)
Wiek: 17 Na forum: 3183 dni Posty: 90
Piwa : 12
Poka? stron? klienta, bo na niej s? eventy powoduj?ce usuni?cie.
Podpis
Pomogłem? Doceń mnie i postaw
Wysłany: 2018-02-06, 21:37
BoJaKoX
Full Stack Developer
Wiek: 36 Na forum: 3244 dni Posty: 40
Piwa : 77
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" >
Wysłany: 2018-02-07, 01:06
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
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
Wysłany: 2018-02-07, 15:46
BoJaKoX
Full Stack Developer
Wiek: 36 Na forum: 3244 dni Posty: 40
Piwa : 77
Nie dzia?a
Tagi: nie :: usuwa :: raportu.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: