Wysłany: 2021-01-18, 00:24
Panasonic_PL_
Wiek: 25 Na forum: 2026 dni Posty: 16
Nick w MP: Tolek
Witam! Wie kto? mo?e czemu nie wy?wietla si? Godzina ani Pasek ?ycia
kod:
Pawn local screenW , screenH = guiGetScreenSize ()
ww , hh = 1920 , 1080
w , h = ( screenW / ww ), ( screenH / hh )
local sw , sh = guiGetScreenSize ()
local panel = false
local zoom = 1
if sw < 1920 then
zoom = math . min ( 2 , 1920 / sw )
end
function getCenter ( x , y )
x , y = x / zoom , y / zoom
return ( sw / 2 ) - ( x / 2 ), ( sh / 2 ) - ( y / 2 )
end
function convertNumber ( number )
local formatted = number
while true do
formatted , k = string . gsub ( formatted , "^(-?%d+)(%d%d%d)" , '%1,%2' )
if ( k == 0 ) then
break
end
end
return formatted
end
local hud_texture = dxCreateTexture ( 'hud.png' , 'argb' , false , 'clamp' )
local dxfont0_font = dxCreateFont ( "font.ttf" , 22 ); local dxfont1_font = dxCreateFont ( "font.ttf" , 19 )
addEventHandler ( "onClientRender" , root , function()
end )
addEventHandler ( 'onClientRender' , root ,function()
if getKeyState ( "tab" ) then return end
zycie = string . format ( "%01.00f" , getElementHealth ( getLocalPlayer ()))
kev = string . format ( "%01.00f" , getPedArmor ( getLocalPlayer ()))
local x_1 , y_1 = getCenter (- 1100 , 1100 ); local x_2 , y_2 = getCenter (- 1200 , 1050 )
local x_3 , y_3 = getCenter (- 1150 , 840 ); local x_4 , y_4 = getCenter (- 1750 , 840 )
local x_5 , y_5 = getCenter (- 1150 , 490 ); local x_6 , y_6 = getCenter (- 1750 , 490 )
local czas = getRealTime ()
local g = czas . hour
local m = czas . minute
local ga =((( g < 10 ) and '0' .. g ) or g )
local ma =((( m < 10 ) and '0' .. m ) or m )
dxDrawImage ( x_1 , y_1 , 400 / zoom , 300 / zoom , hud_texture , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( convertNumber ( getPlayerMoney ( localPlayer )), ( 1700 * w )+ 1 , ( 55 * h )+ 1 , ( 1801 * w )+ 1 , ( 63 * h )+ 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 / zoom , dxfont1_font , "center" , "bottom" , false , false , false , false , false )
dxDrawText ( convertNumber ( getPlayerMoney ( localPlayer )), 1700 * w , 55 * h , 1801 * w , 63 * h , tocolor ( 255 , 255 , 255 , 255 ), 1 / zoom , dxfont1_font , "center" , "bottom" , false , false , false , false , false )
dxDrawText ( string . gsub ( getPlayerName ( localPlayer ), '#%x%x%x%x%x%x' , '' ).. '(' .. getElementData ( localPlayer , 'id' ).. ')' , x_3 + 1 , y_3 + 1 , ( 1830 / zoom )+ 1 , ( 160 / zoom )+ 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( string . gsub ( getPlayerName ( localPlayer ), '#%x%x%x%x%x%x' , '' ).. '(' .. getElementData ( localPlayer , 'id' ).. ')' , x_3 , y_3 , 1830 / zoom , 160 / zoom , tocolor ( 255 , 255 , 255 , 255 ), 1 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( "" .. zycie .. "%" , x_4 , y_4 , ( 1700 / zoom )+ 1 , ( 160 / zoom )+ 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( "" .. zycie .. "%" , x_4 , y_4 , 1700 / zoom , 160 / zoom , tocolor ( 255 , 255 , 255 , 255 ), 1.00 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( "" .. kev .. "%" , x_4 , y_4 , ( 1700 / zoom )+ 1 , ( 210 / zoom )+ 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( "" .. kev .. "%" , x_4 , y_4 , 1700 / zoom , 210 / zoom , tocolor ( 255 , 255 , 255 , 255 ), 1.00 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( ga .. ':' .. ma , x_5 + 1 , y_5 + 1 , ( 2000 / zoom )+ 1 , ( 184 / zoom )+ 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
dxDrawText ( ga .. ':' .. ma , x_5 , y_5 , 2000 / zoom , 184 / zoom , tocolor ( 255 , 255 , 255 , 255 ), 1 / zoom , dxfont1_font , "center" , "center" , false , false , false , false , false )
end )
addEventHandler ( "onClientResourceStart" , resourceRoot , function()
showPlayerHudComponent ( "all" , false )
setPlayerHudComponentVisible ( "crosshair" , true )
showPlayerHudComponent ( "radar" , true )
end )
(Hud Zosta? wzi?ty z Linku: https://gtao.pl/<font-colorcccc99>skrypt<-font>-hud-cripsrpg-v1-vt136855.htm)
Bardzo Prosz? o Szybk? Pomoc
Ostatnio zmieniony przez The Psychol 2021-01-18, 01:15, w całości zmieniany 2 razy
Wysłany: 2021-01-18, 08:56
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Jakie? b??dy /debugscript 3?
Wysłany: 2021-01-18, 09:29
Panasonic_PL_
Wiek: 25 Na forum: 2026 dni Posty: 16
Nick w MP: Tolek
"Wilq" napisał/a :Jakie? b??dy /debugscript 3?
S? B??dy wyskakuj? co chwile, Zaraz napisze dok?adnie Jakie
[ Dodano : 2021-01-18, 09:40 ]
"Wilq" napisał/a :Jakie? b??dy /debugscript 3?
A wi?c b??dy kt?re wyskakuj? w debugscript3: ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x337]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x143]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x310]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x356]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x358]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x354]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x357]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x355]
ERROR: [skrypty]\hud_crips2\client.lua:52: attempt to concatenate a boolean value [DUP x34]
Wysłany: 2021-01-18, 09:44
Lucky!!! :)
Wiek: 20 Na forum: 2372 dni Posty: 121
Nick w MP: Lucky
Piwa : 1163
Panasonic_PL_ , Zobacz teraz
Kod: local panel = false
local zoom = 1
if sw < 1920 then
zoom = math.min(2, 1920 / sw)
end
function getCenter(x, y)
x,y = x / zoom, y / zoom
return (sw / 2) - (x / 2), (sh / 2) - (y / 2)
end
function convertNumber ( number )
local formatted = number
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if ( k==0 ) then
break
end
end
return formatted
end
local hud_texture = dxCreateTexture('hud.png','argb',false,'clamp')
local dxfont0_font = dxCreateFont("font.ttf", 22); local dxfont1_font = dxCreateFont("font.ttf", 19)
addEventHandler("onClientRender", root, function()
end)
addEventHandler('onClientRender',root,function()
if getKeyState("tab") then return end
local zycie = string.format("%01.00f", getElementHealth( getLocalPlayer ()))
local kev = string.format("%01.00f", getPedArmor( getLocalPlayer ()))
local x_1, y_1 = getCenter(-1100,1100); local x_2, y_2 = getCenter(-1200,1050)
local x_3, y_3 = getCenter(-1150,840); local x_4, y_4 = getCenter(-1750,840)
local x_5, y_5 = getCenter(-1150,490); local x_6, y_6 = getCenter(-1750,490)
local czas = getRealTime()
local g = czas.hour
local m = czas.minute
local ga=(((g <10) and '0'..g) or g)
local ma=(((m <10) and '0'..m) or m)
dxDrawImage(x_1, y_1, 400/zoom, 300/zoom, hud_texture, 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(convertNumber(getPlayerMoney(localPlayer)), (1700*w)+1, (55*h)+1, (1801*w)+1, (63*h)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "bottom", false, false, false, false, false)
dxDrawText(convertNumber(getPlayerMoney(localPlayer)), 1700*w, 55*h, 1801*w, 63*h, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "bottom", false, false, false, false, false)
dxDrawText(string.gsub(getPlayerName(localPlayer),'#%x%x%x%x%x%x', '')..'('..getElementData(localPlayer,'id')..')', x_3+1, y_3+1, (1830/zoom)+1, (160/zoom)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(string.gsub(getPlayerName(localPlayer),'#%x%x%x%x%x%x', '')..'('..getElementData(localPlayer,'id')..')', x_3, y_3, 1830/zoom, 160/zoom, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..zycie.."%", x_4, y_4, (1700/zoom)+1, (160/zoom)+1, tocolor(0, 0, 0, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..zycie.."%", x_4, y_4, 1700/zoom, 160/zoom, tocolor(255, 255, 255, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..kev.."%", x_4, y_4, (1700/zoom)+1, (210/zoom)+1, tocolor(0, 0, 0, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..kev.."%", x_4, y_4, 1700/zoom, 210/zoom, tocolor(255, 255, 255, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(ga..':'..ma, x_5+1, y_5+1, (2000/zoom)+1, (184/zoom)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(ga..':'..ma, x_5, y_5, 2000/zoom, 184/zoom, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
end)
addEventHandler("onClientResourceStart", resourceRoot, function()
showPlayerHudComponent("all",false)
setPlayerHudComponentVisible("crosshair",true)
showPlayerHudComponent("radar",true)
end)
Wysłany: 2021-01-18, 16:33
Panasonic_PL_
Wiek: 25 Na forum: 2026 dni Posty: 16
Nick w MP: Tolek
"Lucky!!! " napisał/a :Panasonic_PL_ , Zobacz teraz
Kod: local panel = false
local zoom = 1
if sw < 1920 then
zoom = math.min(2, 1920 / sw)
end
function getCenter(x, y)
x,y = x / zoom, y / zoom
return (sw / 2) - (x / 2), (sh / 2) - (y / 2)
end
function convertNumber ( number )
local formatted = number
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if ( k==0 ) then
break
end
end
return formatted
end
local hud_texture = dxCreateTexture('hud.png','argb',false,'clamp')
local dxfont0_font = dxCreateFont("font.ttf", 22); local dxfont1_font = dxCreateFont("font.ttf", 19)
addEventHandler("onClientRender", root, function()
end)
addEventHandler('onClientRender',root,function()
if getKeyState("tab") then return end
local zycie = string.format("%01.00f", getElementHealth( getLocalPlayer ()))
local kev = string.format("%01.00f", getPedArmor( getLocalPlayer ()))
local x_1, y_1 = getCenter(-1100,1100); local x_2, y_2 = getCenter(-1200,1050)
local x_3, y_3 = getCenter(-1150,840); local x_4, y_4 = getCenter(-1750,840)
local x_5, y_5 = getCenter(-1150,490); local x_6, y_6 = getCenter(-1750,490)
local czas = getRealTime()
local g = czas.hour
local m = czas.minute
local ga=(((g <10) and '0'..g) or g)
local ma=(((m <10) and '0'..m) or m)
dxDrawImage(x_1, y_1, 400/zoom, 300/zoom, hud_texture, 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(convertNumber(getPlayerMoney(localPlayer)), (1700*w)+1, (55*h)+1, (1801*w)+1, (63*h)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "bottom", false, false, false, false, false)
dxDrawText(convertNumber(getPlayerMoney(localPlayer)), 1700*w, 55*h, 1801*w, 63*h, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "bottom", false, false, false, false, false)
dxDrawText(string.gsub(getPlayerName(localPlayer),'#%x%x%x%x%x%x', '')..'('..getElementData(localPlayer,'id')..')', x_3+1, y_3+1, (1830/zoom)+1, (160/zoom)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(string.gsub(getPlayerName(localPlayer),'#%x%x%x%x%x%x', '')..'('..getElementData(localPlayer,'id')..')', x_3, y_3, 1830/zoom, 160/zoom, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..zycie.."%", x_4, y_4, (1700/zoom)+1, (160/zoom)+1, tocolor(0, 0, 0, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..zycie.."%", x_4, y_4, 1700/zoom, 160/zoom, tocolor(255, 255, 255, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..kev.."%", x_4, y_4, (1700/zoom)+1, (210/zoom)+1, tocolor(0, 0, 0, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(""..kev.."%", x_4, y_4, 1700/zoom, 210/zoom, tocolor(255, 255, 255, 255), 1.00/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(ga..':'..ma, x_5+1, y_5+1, (2000/zoom)+1, (184/zoom)+1, tocolor(0,0,0, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
dxDrawText(ga..':'..ma, x_5, y_5, 2000/zoom, 184/zoom, tocolor(255, 255, 255, 255), 1/zoom, dxfont1_font, "center", "center", false, false, false, false, false)
end)
addEventHandler("onClientResourceStart", resourceRoot, function()
showPlayerHudComponent("all",false)
setPlayerHudComponentVisible("crosshair",true)
showPlayerHudComponent("radar",true)
end)
Dalej nie dzia?a, Tym razem w debugscript 3 wyskakuj? b??d: ERROR: [skrypty\hud_cripsa2\client.lua:5: attempt to compare nil with number
Wysłany: 2021-01-18, 17:21
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Na pocz?tku dodaj to:
local screenW , screenH = guiGetScreenSize ()
ww , hh = 1920 , 1080
w , h = ( screenW / ww ), ( screenH / hh )
local sw , sh = guiGetScreenSize ()
Wysłany: 2021-01-18, 17:47
Panasonic_PL_
Wiek: 25 Na forum: 2026 dni Posty: 16
Nick w MP: Tolek
"Wilq" napisał/a :Na pocz?tku dodaj to:
local screenW , screenH = guiGetScreenSize ()
ww , hh = 1920 , 1080
w , h = ( screenW / ww ), ( screenH / hh )
local sw , sh = guiGetScreenSize ()
Nic nie pomog?o, Tym razem wyskakuj? te same b??dy co wy?ej napisa?em
Wysłany: 2021-01-18, 18:10
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Podmie? odpowiednie linijki:
zycie = math . floor ( getElementHealth ( getLocalPlayer ()))
kev = math . floor ( getPedArmor ( getLocalPlayer ()))
Tagi: hud :: nie :: działa
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: