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 +
Ostatnio zmieniony przez Qbik1337 2017-09-03, 12:16, w całości zmieniany 1 raz
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") == 1 or getElementData(localPlayer, "adminduty") == 2 or getElementData(localPlayer, "adminduty") == 3 then
Podmieniasz na:
if getElementData(localPlayer, "adminduty") == 3 or getElementData(localPlayer, "amoduty") == 2 or getElementData(localPlayer, "samoduty") == 1 then
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(reportView, 1)
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(concat, sx*(10+1)/1024, sy*(279+1)/768, sx*(326+1)/1024, sy*(497+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "left", "top", false, true)
dxDrawText(concat, sx*(10)/1024, sy*(279)/768, sx*(326)/1024, sy*(497)/768, white, 1.00, "default", "left", "top", false, true)
end)
function renderingInfo()
--dxDrawRectangle(sx*(258)/1024, sy*(0)/768, sx*(500)/1024, sy*(23)/768, tocolor(0, 0, 0, 155), false)
dxDrawRectangle(sx*(843)/1280, sy*(536)/600, sx*(427)/1280, sy*(28)/600, tocolor(0, 0, 0, 155), false)
--dxDrawText(xtext, sx*(258+1)/1024, sy*(0+1)/768, sx*(758+1)/1024, sy*(23+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, true)
--dxDrawText(xtext, sx*(258)/1024, sy*(0)/768, sx*(758)/1024, sy*(23)/768, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false, true)
dxDrawText(xtext, sx*(860+1)/1280, sy*(542+1)/600, sx*(1260+1)/1280, sy*(560+1)/600, tocolor(0, 0, 0, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawText(xtext, sx*(860)/1280, sy*(542)/600, sx*(1260)/1280, sy*(560)/600, tocolor(255, 0, 0, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawImage(sx*(1242)/1280, sy*(541)/600, sx*(24)/1280, sy*(19)/600, ":dutyAdministracji/img/mark.png", 0, 0, 0, tocolor(255, 255, 255, 255), 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[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)
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)
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
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