Wysłany: 2020-12-07, 23:06
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
Witam,
mam problem odno?nie panelu F1 oraz innych funkcji ale mam wra?enie, ?e to dotyczy tylko jeden z nich.
Problem jest widoczny aktualnie tylko u mnie, nie wiem czy stroi po stronie zasob?w serwera czy odno?nie moich pobranych plik?w, ale podczas przegl?dania panelu F1 nie widz? nic co powinno tam si? znajdowa?. Posy?am dwa Screeny jeden od strony mojej oraz innego gracza.
Z g?ry dzi?kuje za pomoc.
Screeny: https://imgur.com/a/qp2GvQd
Pozdrawiam.
Wysłany: 2020-12-07, 23:56
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Spotka?em si? z tym do?? ostatnio - znajomy mia? identyczny b??d, ja widzia?em i ka?dy widzia?, a on nie widzia? tekst?w kt?re by?y tworzone dxCreateFont, widzia? tylko teksty tworzone defaultowymi czcionkami w mta tj "default-bold" "default" "pricedown"
z tego co ludzie z MTA si? wypowiadali - mo?liwe ?e jest to kwestia braku pami?ci RAM (no on mia? akurat wykorzystanie 100%.
Nie jest to raczej wina kodu a raczej kwestia twojego MTA - spr?bowa?bym reinstalacje MTA, je?li nie pomo?e to ponowna instalacja GTA SA.
Podaj mi jak mo?esz - ile masz pami?ci ram, to sporo wyja?ni.
Wysłany: 2020-12-08, 00:38
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
Witam,
na moim sprz?cie zainstalowanej pami?ci (RAM) jest 4,00 GB.
Pozdrawiam.
Wysłany: 2020-12-08, 00:53
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
"XeroVas" napisał/a :Witam,
na moim sprz?cie zainstalowanej pami?ci (RAM) jest 4,00 GB.
Pozdrawiam.
no to raczej ci??ko b?dzie co? zdzia?a? bo na discordzie MTA pisali ?e jest to kwestia ramu.
dopisa?bym do tych tekst?w przy tworzeniu w dxCreateFont
wtedy ci poka?e chocia? czcionk? z MTA.
Podpis
Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021
Więcej szczegółów
Wystawiono 1 piw(a):XeroVas
Wysłany: 2020-12-08, 08:15
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
Wiem, ?e to mo?e troch? g?upio wygl?da? ale m?g?by? mi dok?adnie powiedzie?, gdzie ten plik znajd?? Jestem pocz?tkuj?cy w tym j?zyku.
Z g?ry dzi?kuje!
Pozdrawiam.
Wysłany: 2020-12-08, 11:56
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
"XeroVas" napisał/a :Wiem, ?e to mo?e troch? g?upio wygl?da? ale m?g?by? mi dok?adnie powiedzie?, gdzie ten plik znajd?? Jestem pocz?tkuj?cy w tym j?zyku.
Z g?ry dzi?kuje!
Pozdrawiam.
Pode?lij kod tego panelu F1.
Podpis
Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021
Wysłany: 2020-12-08, 13:03
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
Kod:
local sX,sY=guiGetScreenSize()
local skala=sX*0.2/384
local cz1=exports["es-fonts"]:createFont("Lato-Bold.ttf",math.floor(20*skala)) -- Lato Bold
local cz2=exports["es-fonts"]:createFont("Lato-Black.ttf",math.floor(15*skala)) -- Lato Black
local cz25=exports["es-fonts"]:createFont("Lato-Black.ttf",math.floor(25*skala)) -- Lato Black
local alpha=0
local strona=1
local statusOkno="hide"
local plec=nil
local blur=nil
local button=exports["es-gui"]:createTexture("button.png")
local button2=exports["es-gui"]:createTexture("button2.png")
local btn={
{strona=3, x=315, y=170, w=320, h=120, png="Regulamin", clr={26,26,26}, clr_napis={255,255,255}, alpha=180},
{strona=4, x=315, y=40, w=320, h=120, png="Premium", clr={26,26,26}, clr_napis={255,255,255}, alpha=180},
{strona=5, x=315, y=-90, w=320, h=120, png="Aktualizacje", clr={26,26,26}, clr_napis={255,255,255}, alpha=180},
{strona=6, x=-10, y=170, w=320, h=120, png="Przewodnik", clr={26,26,26}, clr_napis={255,255,255}, alpha=180, rot=180},
{strona=7, x=-10, y=40, w=320, h=120, png="Komendy", clr={26,26,26}, clr_napis={255,255,255}, alpha=180, rot=180},
{strona=8, x=-10, y=-90, w=320, h=120, png="Mapa", clr={26,26,26}, clr_napis={255,255,255}, alpha=180, rot=180},
}
local przyciski={
{strona=1, x=90, y=-80, w=180, h=40, alpha=210, txt="Dalej"},
{strona=3, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
{strona=4, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
{strona=5, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
{strona=6, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
{strona=7, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
{strona=8, x=90, y=-218.5, w=180, h=40, alpha=210, txt="Zamknij"},
}
local napisy={
{strona=1, x=-140, y=-160, txt="#ffffffWitamy na serwerze #4d4d4dEmergency Stories RolePlay#ffffff!\nAby wy?wietli? list? zak?adek kliknij przycisk #4d4d4dDalej#ffffff!\nAby zamkn?? panel ponownie wci?nij #4d4d4dF1#ffffff\nforum: #4d4d4dForum w budowie.\n#4d4d4d#ffffffMumble: #4d4d4d54.38.202.159:50072", alpha=230, cz=cz1},
{strona=3, x=-150, y=210, txt="#ffffffRegulamin Serwera#4d4d4d!", alpha=230, cz=cz25},
{strona=4, x=-150, y=210, txt="#ffffffPremium#4d4d4d!", alpha=230, cz=cz25},
{strona=5, x=-150, y=210, txt="#ffffffAktualizacje#4d4d4d!", alpha=230, cz=cz25},
{strona=6, x=-150, y=210, txt="#ffffffPrzewodnik#4d4d4d!", alpha=230, cz=cz25},
{strona=7, x=-150, y=210, txt="#ffffffKomendy#4d4d4d!", alpha=230, cz=cz25},
{strona=8, x=-150, y=210, txt="#ffffffMapa#4d4d4d!", alpha=230, cz=cz25},
}
for i,v in ipairs(btn) do
if v.strona>2 then
v.node = xmlLoadFile("f/"..v.png..".xml")
v.text = xmlNodeGetValue(v.node)
v.memo=guiCreateMemo(sX/2-390*skala,sY/2-160*skala,780*skala,370*skala,v.text,false)
guiMemoSetReadOnly(v.memo,true)
guiSetVisible(v.memo,false)
guiSetAlpha(v.memo,0.75)
end
end
triggerServerEvent("pobieranie_na_poczatku", resourceRoot)
addEvent("evc",true)
addEventHandler("evc",resourceRoot,
function(ev,arg1,arg2)
if ev=="showWindow" then
start=getTickCount()
if arg1 then
if statusOkno=="hide" then
statusOkno="showing"
showCursor(true)
guiSetInputMode("no_binds")
addEventHandler("onClientRender",root,panelOkienko)
addEventHandler("onClientRender",root,animacjaOkienko)
setElementData(localPlayer,"3dtext_status",false)
blur=exports.blur_box:createBlurBox(sX/2-450*skala,sY/2-255*skala,900*skala,550*skala, 255, 255, 255, 230, false)
end
else
if statusOkno=="show" then
statusOkno="hidding"
setElementData(localPlayer,"3dtext_status",true)
if getElementData(localPlayer,"magazynier:ma_paczke") then
toggleControl("walk", false)
toggleControl("crouch", false)
toggleControl("sprint", false)
toggleControl("jump", false)
setControlState("walk", true)
end
if blur then
exports.blur_box:destroyBlurBox(blur)
blur=nil
end
end
end
end
end)
function animacjaOkienko()
if statusOkno=="showing" then
if alpha < 180 then
alpha=alpha+10
end
if alpha == 180 then
statusOkno="show"
end
elseif statusOkno=="hidding" then
for i,v in ipairs(btn) do
guiSetVisible(v.memo, false)
end
if alpha > 0 then
alpha=alpha-15
end
if alpha == 0 then
statusOkno="hide"
removeEventHandler("onClientRender",root,panelOkienko)
showCursor(false)
guiSetInputMode("allow_binds")
strona=1
removeEventHandler("onClientRender",root,animacjaOkienko)
end
end
end
function panelOkienko()
kx, ky = getCursorPosition()
kx = kx*sX
ky = ky*sY
dxDrawRectangle(sX/2-450*skala,sY/2-255*skala,900*skala,550*skala,tocolor(0,0,51,alpha))
if alpha == 180 then
for i,v in ipairs(btn) do
if strona==2 then
if (kx >= sX/2-(v.x*skala)) and (kx <= sX/2-(v.x*skala-(v.w*skala))) and (ky >= sY/2-(v.y*skala)) and (ky <= sY/2-((v.y*skala)-(v.h*skala))) then
if v.alpha < 250 then
v.alpha=v.alpha+2
end
else
if v.alpha > 180 then
v.alpha=v.alpha-2
end
end
elseif strona==v.strona then v.alpha=255
end
if strona>=2 then
dxDrawImage(sX/2-(v.x*skala),sY/2-(v.y*skala),v.w*skala,v.h*skala,button, v.rot or 0, 0, 0, tocolor(255,255,255,v.alpha))
dxDrawText(v.png, sX/2-(v.x*skala),sY/2-(v.y*skala),sX/2-((v.x*skala)-(v.w*skala)),sY/2-((v.y*skala)-(v.h*skala)), tocolor(255,255,255,v.alpha), scale, cz25, "center", "center")
end
end
if strona>=2 then
dxDrawText("#ffffffKliknij w #4d4d4dkategori?#ffffff aby zobaczy? szczeg??y#4d4d4d!", sX/2+75*skala, sY/2-230*skala, sX/2-50*skala, sY/2-180*skala, tocolor(255, 255 ,255, 200), scale, cz1, "center", "top", false, false, false, true)
dxDrawText("#ffffffJe?eli jeste? nowym graczem wejd? w zak?adk? #4d4d4dprzewodnik#ffffff!", sX/2+75*skala, sY/2+230*skala, sX/2-50*skala, sY/2+180*skala, tocolor(255, 255 ,255, 200), scale, cz1, "center", "top", false, false, false, true)
end
if strona>= 3 then
dxDrawRectangle(sX/2-425*skala,sY/2-232.5*skala,850*skala,500*skala,tocolor(240,240,240,230))
end
for i,v in ipairs(przyciski) do
if strona==v.strona then
if (kx >= sX/2-(v.x*skala)) and (kx <= sX/2-(v.x*skala-(v.w*skala))) and (ky >= sY/2-(v.y*skala)) and (ky <= sY/2-((v.y*skala)-(v.h*skala))) then
if v.alpha < 245 then
v.alpha=v.alpha+5
end
else
if v.alpha > 210 then
v.alpha=v.alpha-5
end
end
dxDrawImage(sX/2-(v.x*skala),sY/2-(v.y*skala),v.w*skala,v.h*skala,button2, 0, 0, 0, tocolor(255,255,255,v.alpha))
dxDrawText(v.txt, sX/2-(v.x*skala),sY/2-(v.y*skala),sX/2-((v.x*skala)-(v.w*skala)),sY/2-((v.y*skala)-(v.h*skala)), tocolor(255,255,255,v.alpha), scale, cz2, "center", "center")
end
end
for i,v in ipairs(napisy) do
if strona==v.strona then
dxDrawText(v.txt, sX/2-(v.x)*skala,sY/2-(v.y)*skala,sX/2-150*skala,sY/2-180*skala, tocolor(255,255,255,230), 1.00, v.cz, "center", "center", false, false, false, true)
end
end
if strona==1 then
dxDrawImage(sX/2-440*skala,sY/2-240*skala,362*skala,90*skala,"i/logo.png",0,0,0,tocolor(255,255,255,alpha))
end
for i,v in ipairs(btn) do
if isElement(v.memo) then
if strona==v.strona then
if not guiGetVisible(v.memo) then
guiSetVisible(v.memo, true)
end
else
if guiGetVisible(v.memo) then
guiSetVisible(v.memo, false)
end
end
end
end
end
end
addEventHandler("onClientClick", root,
function(_,state,abx,aby)
if statusOkno=="hide" then
return
end
if (state=="up") then
if strona==2 then
local z_btn=nil
for i,v in ipairs(btn) do
if (kx >= sX/2-(v.x*skala)) and (kx <= sX/2-(v.x*skala-(v.w*skala))) and (ky >= sY/2-(v.y*skala)) and (ky <= sY/2-((v.y*skala)-(v.h*skala))) then
z_btn=v
end
end
if not z_btn then
return
end
strona=z_btn.strona
image_section=0
end
local z_przyciski=nil
for i,v in pairs(przyciski) do
if (kx >= sX/2-(v.x*skala)) and (kx <= sX/2-(v.x*skala-(v.w*skala))) and (ky >= sY/2-(v.y*skala)) and (ky <= sY/2-((v.y*skala)-(v.h*skala))) then
if (strona==v.strona) then
z_przyciski=v
end
end
end
if not z_przyciski then return end
if strona==1 then
if (z_przyciski.txt=="Dalej") then
strona=2
end
elseif strona==3 or 4 or 5 or 6 or 7 or 8 then
if (z_przyciski.txt=="Zamknij") then
strona=2
end
end
end
end
)
addEvent("update", true)
addEventHandler("update", resourceRoot,
function(tekst)
local z_a=nil
for k,v in ipairs(btn) do
if (v.png=="Aktualizacje") then
z_a=v
end
end
if not z_a then
return
end
if not z_a.memo or not isElement(z_a.memo) then
triggerEvent("update", resourceRoot, tekst)
return
end
guiSetText(z_a.memo, tekst)
end
)
bindKey("F1", "down",
function()
if not getElementData(localPlayer, "dbid") then exports["es-komunikaty"]:komunikat("Najpierw si? zaloguj.") return end
if statusOkno~="show" then
triggerEvent("evc",resourceRoot,"showWindow",true)
elseif statusOkno~="hide" then
triggerEvent("evc",resourceRoot,"showWindow",false)
end
end)
addEventHandler("onClientResourceStop",resourceRoot,
function()
if statusOkno~="hide" then
guiSetInputMode("allow_binds")
showCursor(false)
setElementData(localPlayer,"3dtext_status",true)
showChat(true)
setPlayerHudComponentVisible("radar", true)
setElementData(localPlayer, "dzielniceoff", false)
if blur then
exports.blur_box:destroyBlurBox(blur)
blur=nil
end
end
end)
Wysłany: 2020-12-08, 13:14
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Z tego co widz? es-fonts tworzy czcionki - pode?lij kod z tego.
Wysłany: 2020-12-08, 14:21
RudyTMM [Usunięty ]
"XeroVas" napisał/a :Witam,
na moim sprz?cie zainstalowanej pami?ci (RAM) jest 4,00 GB.
Pozdrawiam.
Kwestia ramu to napewno nie jest, ja mam 4,00 GB. i wszystko ?miga jak nale?y.
Wysłany: 2020-12-08, 14:24
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
"RudyTMM" napisał/a : "XeroVas" napisał/a :Witam,
na moim sprz?cie zainstalowanej pami?ci (RAM) jest 4,00 GB.
Pozdrawiam.
Kwestia ramu to napewno nie jest, ja mam 4,00 GB. i wszystko ?miga jak nale?y.
Wszystko jest kwesti? co on ma odpalone, na discordzie MTA by?o sporo takich sytuacji i m?wili ?e jest to spowodowane RAM'em, nie jest to b??d plik?w wi?c ci??ko cokolwiek zdzia?a? w tej sytuacji - nie wiedz?c praktycznie co mo?na zrobi?.
Jedyna opcja na ten moment to reinstall MTA/GTA, je?li nie pomo?e no to jedynie dopisanie urywku kodu do tworzenia czcionek wystarczy.
Podpis
Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021
Wysłany: 2020-12-08, 17:36
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
"satan_" napisał/a :Z tego co widz? es-fonts tworzy czcionki - pode?lij kod z tego.
Kod:
local path = "f/"
local function setupElementParent(element,resource)
if not element or not resource then
return false
end
setElementParent(element,getResourceDynamicElementRoot(resource))
return true
end
function createFont(name,...)
local element = dxCreateFont(path..tostring(name),...)
setupElementParent(element,sourceResource)
return element
end
Wysłany: 2020-12-08, 19:58
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
local path = "f/"
local function setupElementParent ( element , resource )
if not element or not resource then
return false
end
setElementParent ( element , getResourceDynamicElementRoot ( resource ))
return true
end
function createFont ( name ,...)
local element = dxCreateFont ( path .. tostring ( name ),...) or "default"
setupElementParent ( element , sourceResource )
return element
end
Więcej szczegółów
Wystawiono 1 piw(a):XeroVas
Wysłany: 2020-12-08, 23:38
XeroVas
Wiek: 24 Na forum: 4366 dni Posty: 9
Nick w MP: WyzgaPL
Temat do zamkni?cia, b??d zosta? naprawiony.
Leci zimne piwko!
Tagi: ems :: panel
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: