Wysłany: 2020-10-21, 08:43
evve
Wiek: 24 Na forum: 2695 dni Posty: 15
Nick w MP: cruzeN
Piwa : 306
Wywala mi taki b??d i w og?le nie pokazuje tekst?w
https://imgur.com/a/wiAhdti
Cytat: --[[
## ## #### ######## ####### ###### ######## ######## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
######### ## ######## ## ## ###### ## ###### #####
## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## #### ## ## ####### ###### ######## ######## ## ##
@Autor: Hiroszek ([email protected] )
@Copyright: SaintRPG
@Pierwotne prawo do u?ytkowania tego zasobu ma tylko i wy??cznie pierwotny Autor.
@Obowi?zuje ca?kowity zakaz rozpowszechniania, zmiany autora jak i edycji zasobu.
@Obowi?zuje ca?kowity nakaz zachowania autora po uzyskaniu zgody na u?ywanie skryptu przez autora
@Nakazuje si? zastosowa? do regulaminu zawartego w licencji skryptu
@Z?amanie powy?szych podpunkt?w wi??e si? z odpowiedzialno?ci? karn?, "Naruszenie praw autorskich".*
*Skan dokumentu potwierdzaj?cego przypisanie prawa autorskiego tego zasobu - [email protected]
]]
--POTRZEBNE
local sx, sy = guiGetScreenSize()
zmienna = 1920/sx
local font = dxCreateFont(":sr-files/fonts/SegoeLight.ttf", 18/zmienna)
local iconf1 = dxCreateFont(":sr-files/fonts/FiraEC.ttf", 19/zmienna)
local iconf2 = dxCreateFont(":sr-files/fontawesome/FA5.ttf", 23/zmienna)
--BUTTON
function guibutton(tekst,w1,w2,w3,w4,a)
dxDrawImage(w1,w2,w3,w4, ":sr-files/gui/button.png", 0, 0, 0, tocolor(255,255,255, a), false)
if isMouseIn(w1,w2,w3,w4) then dxDrawImage(w1,w2,w3,w4, ":sr-files/gui/activebutton.png", 0, 0, 0, tocolor(255,255,255, a), false) end
dxDrawText(tostring(tekst):gsub("#%x%x%x%x%x%x",""), w1 + 1, w2 + 1, w1+w3 + 1, w2+w4 -4, tocolor(0, 0, 0, a), 1.00, font, "center", "center", false, false, false, true, false)
dxDrawText(tostring(tekst), w1,w2,w1+w3,w2+w4 - 5, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, true, false)
end
--BUTTONrgb
function guibuttonrgb(tekst,w1,w2,w3,w4,a,r,g,b)
dxDrawImage(w1,w2,w3,w4, ":sr-files/gui/button.png", 0, 0, 0, tocolor(255,255,255, a), false)
if isMouseIn(w1,w2,w3,w4) then dxDrawImage(w1,w2,w3,w4, ":sr-files/gui/activebutton2.png", 0, 0, 0, tocolor(r,g,b, a), false) end
dxDrawText(tostring(tekst):gsub("#%x%x%x%x%x%x",""), w1 + 1, w2 + 1, w1+w3 + 1, w2+w4 -4, tocolor(0, 0, 0, a), 1.00, font, "center", "center", false, false, false, true, false)
dxDrawText(tostring(tekst), w1,w2,w1+w3,w2+w4 - 5, tocolor(255, 255, 255, a), 1.00, font, "center", "center", false, false, false, true, false)
end
--BUTTONhex
function guibuttonhex(w1,w2,w3,w4,a)
if isMouseIn(w1,w2,w3,w4) then
dxDrawImage(w1, w2, w3, w4, ":sr-files/logowanie/new/buttonlogina.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
else
dxDrawImage(w1, w2, w3, w4, ":sr-files/logowanie/new/buttonlogin.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
end
end
--BUTTON ICON
function guibuttonicon(tekst,w1,w2,w3,w4,a,icon)
dxDrawImage(w1, w2, w3, w4, ":sr-files/gui/normal.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
if isMouseIn(w1,w2,w3,w4) then dxDrawImage(w1,w2,w3,w4, ":sr-files/gui/selected.png", 0, 0, 0, tocolor(255,255,255, a-20), false) end
--tekst
dxDrawText(tostring(tekst), (w1+95)+1,w2+1,(w1+w3)+1,(w2+w4)+1, tocolor(0, 0, 0, a), 1.00, iconf1, "left", "center", false, false, false, false, false)
dxDrawText(tostring(tekst), (w1+95),w2,(w1+w3),(w2+w4), tocolor(255, 255, 255, a), 1.00, iconf1, "left", "center", false, false, false, false, false)
--ikona
dxDrawText(tostring(icon), w1+1,w2+1,(w1+95)+1,(w2+w4)+1, tocolor(0, 0, 0, a), 1.00, iconf2, "center", "center", false, false, false, false, false)
dxDrawText(tostring(icon), w1,w2,(w1+95),(w2+w4), tocolor(255, 255, 255, a), 1.00, iconf2, "center", "center", false, false, false, false, false)
end
--SWITCH
function guiswitch(w1,w2,w3,w4,a,wlaczony)
if wlaczony == true then
dxDrawImage(w1, w2, w3, w4, ":sr-files/gui/switchon.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
--if isMouseIn(w1,w2,w3,w4) then dxDrawImage(w1, w2, w3, w4, ":sr-files/gui/switchoff.png", 0, 0, 0, tocolor(255, 255, 255, a), false) end
else
dxDrawImage(w1, w2, w3, w4, ":sr-files/gui/switchoff.png", 0, 0, 0, tocolor(255, 255, 255, a), false)
--if isMouseIn(w1,w2,w3,w4) then dxDrawImage(w1, w2, w3, w4, ":sr-files/gui/switchon.png", 0, 0, 0, tocolor(255, 255, 255, a), false) end
end
end
--ICON
function guiicon(icon,w1,w2,w3,w4,a,fonthere,test123, test321, r,g,b)
if not r then r = 188 end
if not g then g = 188 end
if not b then b = 188 end
if test321 ~= 1 then
dxDrawText(tostring(icon), w1+1,w2+1,w3+1,w4+1, tocolor(0, 0, 0, a), 1.00, fonthere, "center", "center", false, false, false, false, false)
end
if test123 == 1 then
dxDrawText(tostring(icon), w1,w2,w3,w4, tocolor(r, g, b, a), 1.00, fonthere, "center", "center", false, false, false, false, false)
if isMouseIn(w1,w2,w3-w1,w4-w2) then dxDrawText(tostring(icon), w1,w2,w3,w4, tocolor(255, 255, 255, a), 1.00, fonthere, "center", "center", false, false, false, false, false) end
else
dxDrawText(tostring(icon), w1,w2,w3,w4, tocolor(255, 255, 255, a), 1.00, fonthere, "center", "center", false, false, false, false, false)
end
end
--Tekst
function guitext(tekst,w1,w2,w3,w4,r,g,b,a,textfont,typtenno, typtennodwa)
if not typtenno then typtenno = "center" end
if not typtennodwa then typtennodwa = "center" end
dxDrawText(tostring(tekst):gsub("#%x%x%x%x%x%x",""), w1 + 1, w2 + 1, w3 + 1, w4 +1, tocolor(0, 0, 0, a), 1.00, textfont, typtenno, typtennodwa, false, false, false, true, false)
dxDrawText(tostring(tekst), w1,w2,w3,w4, tocolor(r, g, b, a), 1.00, textfont, typtenno, typtennodwa, false, false, false, true, false)
end
--Tekstcas
function guitextcas(tekst,w1,w2,w3,w4,r,g,b,a,textfont,typtenno, typtennodwa)
if not typtenno then typtenno = "center" end
if not typtennodwa then typtennodwa = "center" end
dxDrawText(tostring(tekst):gsub("#%x%x%x%x%x%x",""), w1 + 1, w2 + 1, w3 + 1, w4 +1, tocolor(0, 0, 0, a), 1.00, textfont, typtenno, typtennodwa, false, false, true, true, false)
dxDrawText(tostring(tekst), w1,w2,w3,w4, tocolor(r, g, b, a), 1.00, textfont, typtenno, typtennodwa, false, false, true, true, false)
end
--Tekstprawko
function guitextprawko(tekst,w1,w2,w3,w4,r,g,b,a,textfont,typtenno, typtennodwa)
if not typtenno then typtenno = "center" end
if not typtennodwa then typtennodwa = "center" end
dxDrawText(tostring(tekst), w1 + 1, w2 + 1, w3 + 1, w4 +1, tocolor(0, 0, 0, a), 1.00, textfont, typtenno, typtennodwa, false, true, false, false, false)
dxDrawText(tostring(tekst), w1,w2,w3,w4, tocolor(r, g, b, a), 1.00, textfont, typtenno, typtennodwa, false, true, false, false, false)
end
--tekstlogiadmin
function guitextlogiadm(tekst,w1,w2,w3,w4,r,g,b,a,textfont,typtenno, typtennodwa)
if not typtenno then typtenno = "center" end
if not typtennodwa then typtennodwa = "center" end
dxDrawText(tostring(tekst):gsub("#%x%x%x%x%x%x",""), w1 + 1, w2 + 1, w3 + 1, w4 +1, tocolor(0, 0, 0, a), 1.00, textfont, typtenno, typtennodwa, false, true, false, true, false)
dxDrawText(tostring(tekst), w1,w2,w3,w4, tocolor(r, g, b, a), 1.00, textfont, typtenno, typtennodwa, false, true, false, true, false)
end
--RESZTA
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
Wysłany: 2020-10-21, 09:05
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Masz tutaj
kt?re jest zmienn?, lecz nigdzie nie ma tworzenia tekstu o tej zmiennej, zmie? 8 argument na , kt?ry masz na g?rze kodu, po prostu z tego co widz? - przy exporcie nie podajesz fontu, najlepiej zmieni? w kodzie textfont w tych linijkach na
ps. nast?pnym razem poka? dok?adnie kt?re linijki maj? b??d bo nie ka?demu chce si? szuka?.
Wysłany: 2020-10-21, 16:49
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
psych0. , przecie? poda? screena z b??dami, podane s? linijki.
Tak czy siak, b??d zmiennej.
Wysłany: 2020-10-21, 19:32
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
"Shuffle" napisał/a :psych0. , przecie? poda? screena z b??dami, podane s? linijki.
Tak czy siak, b??d zmiennej.
Dok?adniej, chodzi mi o wskazanie linijki w kt?rej jest ten b??d, nie kodzi mi o b??d db3 bo go pokaza?, b??d dotyczy jednej linijki i chodzi mi w skr?cie by nast?pnym razem pokaza? linijke kodu, kt?ra dotyczy b??du.
ps. to nie b??d zmiennej a raczej jej brak.
Podpis
Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021
Tagi: nie :: dzialaja :: teksty
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: