Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: hudu
1. wywalenie starego hudu
dopisuje to, a klasyczny hud nadal jest pod nowym
[code]function Start ()


showPlayerHudComponent("clock",false)


showPlayerHudComponent("money",false)


showPlayerHudComponent("health",false)


showPlayerHudComponent("armour",false)


showPlayerHudComponent("weapon",false)


showPlayerHudComponent("ammo",false)


showPlayerHudComponent("wanted",false)


showPlayerHudComponent("breath",false)


end


addEventHandler( "onClientResourceStart", rootElement, Start )
[/code]

[code]--[[
Skrypt zosta?‚ wykonany przez:
?€?NotPaladyn ([email protected]) (NotPaladyn#0477)

ZasĂłb napisany dla uĹĽytkownikĂłw forum GTAONLINE.PL
]]--

local sw,sh = guiGetScreenSize()
local baseX = 1920
local zoom = 1
local minzoom = 2
if sw < baseX then
zoom = math.min(minzoom, baseX/sw)
end

hud = {
isOpen = true,

money_icon = dxCreateTexture("images/money_icon.png", "argb", false, "clamp"),
rp_icon = dxCreateTexture("images/rp_icon.png", "argb", false, "clamp"),

font = dxCreateFont("fonts/Exo2-Light.ttf", 13),

health = {x=sw-215/zoom, y=30/zoom, w=200/zoom, h=4/zoom},
armor = {x=sw-215/zoom, y=60/zoom, w=200/zoom, h=4/zoom},
i_money = {x=sw-40/zoom, y=80/zoom, w=20/zoom, h=20/zoom},
t_money = {x=sw-215/zoom, y=80/zoom, w=s...
2. Naprawa Hudu
Przy logowaniu pokazuje sie stary hud i moj tak jak by 2 hudy, co mam zrobic zeby pojawial sie moj a przy logowaniu domyslny znika??
3. nie wczytuje hudu
Tak samo jak nizej nie wczytuje hudu paczka modern mta
debugscript: https://imgur.com/a/rEUJCpD


Kod:

hud.checkMoney = function()
TA linijka -- hud.money = {convertValue(getPlayerMoney(localPlayer))..' PLN', convertValue(tonumber(getElementData(localPlayer, 'user:money')['dirt']) or 0)..' PLN'};
hud.health = getElementHealth(localPlayer) / 100;
hud.ammo = {getPedAmmoInClip(localPlayer)..'/'..getPedTotalAmmo(localPlayer), getPedWeapon(localPlayer)};
4. HP z hudu nie spada
Witam trace hp a w hudzie jest dalej 100%
[lua]function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end

function roundedRectangle(x, y, w, h, color)
exports["blur"]:dxDrawBluredRectangle(x, y, w, h, color, false)
exports["blur"]:dxDrawBluredRectangle(x + 2, y - 1, w - 4, 1, color, false)
exports["blur"]:dxDrawBluredRectangle(x + 2, y + h, w - 4, 1, color, false)
exports["blur"]:dxDrawBluredRectangle(x - 1, y + 2, 1, h - 4, color, false)
exports["blur"]:dxDrawBluredRectangle(x + w, y + 2, 1, h - 4, color, false)
end

local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()

function kursorek(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


local fps = 0
local tick = getTickCount()

function getCurrentFPS()
return fps
end

local clip_sizes = {
[22] = 17,
[23] = 17,
[23] = 7,
[25] = 1,
[2...
5. Schowanie hudu podczas logowania
Witam otoz nwm jak i gdzie wstawic element date na schowanie hudu,
element data
player:logged


[lua]--[[
Skrypt: HUD
Autor: Venteer
Dla GTAO.pl
]]

function przecinek(liczba)
local format = liczba
while true do
format, k = string.gsub(format, "^(-?%d+)(%d%d%d)", '%1,%2')
if ( k==0 ) then
break
end
end
return format
end

--Dane

local sW, sH=guiGetScreenSize() -- /1920*sW /1080*sH
local font = dxCreateFont ("files/czcionka.ttf", 30)
setElementData(localPlayer, "hud", true)

--HUD



addEventHandler("onClientRender", root, function()
setPlayerHudComponentVisible("ammo", false)
setPlayerHudComponentVisible("area_name", false)
setPlayerHudComponentVisible("armour", false)
setPlayerHudComponentVisible("breath", false)
setPlayerHudComponentVisible("clock", false)
setPlayerHudComponentVisible("health", false)
setPlayerHudComponentVisible("money", false)
setPlayerHudComponentVisible("vehicle_name", false)
setPlayerHudComponentVisible("weapon", false)
setPlayerHudComponentVisible("radio", false)
setPlayerHudComponentVisible("wanted", false)
if not getElementData(localPlayer, "hud") then return end
local health = getElementHealth(localPlayer)
health ...
6. ID DO HUDU
Witam pomo?e mi kto? doda? id do hudu np ?e obok godziny wy?wietla id bo nwm jak to zrobi? za dobr? odpowied? stawiam zimne :piwo:

[lua]setPlayerHudComponentVisible("ammo", false)
setPlayerHudComponentVisible("armour", false)
setPlayerHudComponentVisible("clock", false)
setPlayerHudComponentVisible("health", false)
setPlayerHudComponentVisible("money", false)
setPlayerHudComponentVisible("vehicle_name", false)
setPlayerHudComponentVisible("weapon", false)

local sx,sy = guiGetScreenSize()
local px,py = (sx/1366),(sy/768)

bindKey("f11", "down", function()
if map == true then
map = false
setElementData(localPlayer, "hud:enabled", true)
showChat(true)
setPlayerHudComponentVisible("all", false)
setPlayerHudComponentVisible("radar", true)
setPlayerHudComponentVisible("crosshair", true)
setElementData(localPlayer, "logged", true)
else
map = true
setElementData(localPlayer, "hud:enabled", false)
showChat(false)
setPlayerHudComponentVisible("all", false)
setElementData(localPlayer, "logged", false)
end
end)

--[[addEventHandler("onClientRender", root,
function()
local godzina, minuty = getRealTime().hour, getRealTime().minute
dxDrawImage(652*px, 0*py, 714*px, 112*py, "hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), fals...
7. Logowanie, pozbycie się widoczności hudu przy logowaniu
Witam, posiadam problem, gdy? jak si? kto? loguje na serwer, to wida? ju? hud przy logowaniu, a chc? aby to by?o zrobione tak, aby hudu nie by?o wida? podczas logowania tylko normalnie w grze (w grze go wida? normalnie tylko chodzi o to logowanie)
8. Jest skrypt na wylaczenie radaru, chatu i hudu
Tak jak w temacie. Jest taki skrypt bo przydaloby mi sie takie cos na serwer.
po wpisaniu ./yoff chowalo by sie wszystko a po wpisaniu ./yon pokazywalo :)
9. chowanie custom hudu
Jak schowac custom hud podczas logowania? Jest jakis export na to ?
10. Skrypt ukrywania hudu w mta
Siemanko, je?eli kto? mia?y kod ukrywaj?cy podstawowy hud i podes?a?by go - b?d? wdzi?czny. :)
11. Dlaczegu hudu nie widać
Witam, mi na kompie hud dzia?a, odpali?em laptopa, wszed?em na m?j lokalny serwer, i hudu ju? nie wida?.

Kod:

function dxGUI()
    
dxDrawRectangle(436, 999, 469, 53, tocolor(12, 12, 12), false)
        
dxDrawRectangle(436, 1052, 469, 14, tocolor(255, 0, 0, 255), false)
addEventHandler("onClientRender", root, dxGUI)
12. Mam pr0blem dodanie nicku do hudu
Cze??, tak sobie skryptuje w luta, i nie moge doda? nicku do Hudu,

[code]
W, sH = guiGetScreenSize()
x = 1363
y = 1100

function hud()
if isPlayerHudComponentVisible("radar") == true then
showPlayerHudComponent("ammo", false)
showPlayerHudComponent("armour", false)
showPlayerHudComponent("breath", false)
showPlayerHudComponent("clock", false)
showPlayerHudComponent("health", false)
showPlayerHudComponent("money", false)
showPlayerHudComponent("weapon", false)
showPlayerHudComponent("wanted", false)

local name = getPlayerName
local realtime = getRealTime() d
local hour = realtime.hour
local minute = realtime.minute

dxDrawRectangle((1210/x)*sW, (46/y)*sH, (140/x)*sW, (27/y)*sH, tocolor(0, 0, 0, 208), true)

dxDrawText("Zycie: "..math.floor(getElementHealth(localPlayer)).. "%", (1190/x)*sW, (100/y)*sH, (1381/x)*sW, (68/y)*sH, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, true, false, false)



dxDrawRectangle((1069/x)*sW, (4/y)*sH, (286/x)*sW, (184/y)*sH, tocolor(0, 0, 0, 255), false)

dxDrawRectangle((1075/x)*sW, (163/y)*sH, (275/x)*sW, (20/y)*sH, tocolor(0, 0, 0, 217), true)

dxDrawText(" "..hour..":"..minute.."", (1280/x)*sW, (10/y)*sH, (1320/x)*sW, (120/y)*sH, tocolor(255, 255, 255, 255), 1.40, "default", "left&quo...
13. usunięcie standardowego hud'u
Cze??, mam pytanie, jak usun?? standardowy hud? :)
Oczywi?cie :piwo: za odpowiedz :)

Pozdrawiam,
mlodasnygo
14. Wyłączenie i włączenie Hudu
Jaka funkcja jest odpowiedzialna za w??czenie i wy??czanie HUdu?
15. Brak Hudu i Radaru
Nw czemu ale na w?asnym serwie nikt nie ma hudu i radaru co trzeba zrobi? bo znika ci?gle ?