Search the Community
Showing results for tags 'hud'.
-
Una consulta chicos como hago para que este local sounds sea infinito ya que cuando activo esta script solo se reproduce una vez y luego se corta.. function onResourceStart() local Zx,Zy,Zz = getElementPosition( ped ) --- Puede ser que halla un mal argumento aquí? porque el debugscript 3 me dice que sí!!!... local sound = playSound("sounds/respiracion.ogg", Zx, Zy, Zz, false) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart)
-
i created a 'circle-hud' but it does not work well this is the problem: (when my Health = 14hp) and when my Health = 100hp the 100hp is fine, but the 14 hp not... i want something like that when my hp <100 how to fix this?
-
السلام عليكم شباب شباب ازاى اصنع HUD HUDو لسرعه السياره وحال السياره والبنزين وشكرا شباب
-
Hello guys. So, I'm working on a HUD and i want it to look good for every size of monitor. The size of the recentagles and the images is just easly declared relativly to the screen width or height (It's ok it's looks good on FullHD and 1377x768) My biggest problem is the fonts. I want it to be easily readable for everyone but to achieve that i should now the ppi or somethink like that. Is there any way to get it (ppi or diameter)? Any suggestion how should i do this if i can get those data?
-
I have a question, can I just move the elements of the default interface? Or do I always have to create others from them? I just want to get, for example: getElementHealth And move it! In fact, I would like to do this with everyone, such as: getTime getPedWeapon getPedArmor getPedAmmoInClip getPedTotalAmmo getPedOxygenLevel getPlayerMoney getPlayerWantedLevel I do not want to create another, I want the standard, you know?
-
Hi! I use guieditor to add an image(with dxdrawimage) position. It is on relative, but it's don't working. We are in the server, and someone's hud sticking out from the screen. He has correct resolution. What is the problem? Here is the code: dxDrawImage(screenW * 0.6698, screenH * 0.0130, screenW * 0.3228, screenH * 0.1341, "img/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- 1 reply
-
- dxdrawimage
- image
- (and 5 more)
-
local sX, sY = guiGetScreenSize() local mainW, mainH = 285, 125 local mainX, mainY = sX-mainW-10, sY-mainH-730 local lp = getLocalPlayer() local hudColors = { ["main"] = tocolor(0, 0, 0, 125), ["sub"] = tocolor(0, 0, 0, 75), ["health"] = tocolor(255, 0, 0, 75), ["armor"] = tocolor(255, 255, 255, 75), ["oxygen"] = tocolor(0, 186, 255, 75) } addEventHandler("onClientRender", getRootElement(), function() showPlayerHudComponent("all", false) showPlayerHudComponent("crosshair", true) dxDrawRectangle(mainX, mainY, mainW, mainH, hudColors["main"]) -- Életerő dxDrawRectangle(mainX+135, mainY+10, mainW-151, 20, hudColors["sub"]) dxDrawRectangle(mainX+137, mainY+12, getElementHealth(localPlayer)*(mainW-25)/400, 16, hudColors["health"]) dxDrawText(math.floor(getElementHealth(lp)).." élet", mainX+257, mainY+14.2, mainX+mainW-135, mainY+30, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center") dxDrawText(math.floor(getElementHealth(lp)).." élet", mainX+257, mainY+10, mainX+mainW-135, mainY+30, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center") -- Páncél dxDrawRectangle(mainX+135, mainY+34, mainW-150, 20, hudColors["sub"]) dxDrawRectangle(mainX+137, mainY+36, getPedArmor(localPlayer)*(mainW-155)/100, 16, hudColors["armor"]) dxDrawText("Életpajzs", mainX+257, mainY+38.2, mainX+mainW-135, mainY+54, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center") dxDrawText("Életpajzs", mainX+257, mainY+35, mainX+mainW-135, mainY+54, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center") -- Oxigén dxDrawRectangle(mainX+135, mainY+58, mainW-150, 20, hudColors["sub"]) dxDrawRectangle(mainX+137, mainY+60, getPedOxygenLevel(localPlayer)*(mainW-155)/1000, 16, hudColors["oxygen"]) dxDrawText("Oxigén", mainX+257, mainY+62.2, mainX+mainW-135, mainY+78, tocolor(0, 0, 0, 255), 1, "default-bold", "center", "center") dxDrawText("Oxigén", mainX+257, mainY+59, mainX+mainW-135, mainY+78, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center") -- Pénz local moneyLength = string.len(getPlayerMoney(localPlayer)) dxDrawText(string.sub("FullFunPlay ", moneyLength-25, 29) .. "#000000$" .. getPlayerMoney(localPlayer) .. "#000000", mainX+10, mainY+96.1, mainX+mainW-10, nil, tocolor(0, 0, 0, 255), 1.6, "default-bold", "right", nil, false, false, false, true) dxDrawText(string.sub("FullFunPlay ", moneyLength-25, 29) .. "#00baff$" .. getPlayerMoney(localPlayer) .. "#00baff", mainX+10, mainY+93, mainX+mainW-10, nil, tocolor(255, 255, 255, 255), 1.6, "default-bold", "right", nil, false, false, false, true) -- Fegyver local pWeapon = getPedWeapon(localPlayer) local clipAmmo = getPedAmmoInClip(localPlayer) local totalAmmo = getPedTotalAmmo(localPlayer) --dxDrawText("Lőszer: " .. clipAmmo .. " | " .. totalAmmo-clipAmmo, mainX+100, 109.5, nil, nil, tocolor(0, 0, 0, 255), 1.1, "default-bold") dxDrawText("Lőszer: " .. clipAmmo .. " | " .. totalAmmo-clipAmmo, mainX+35, 120, nil, nil, tocolor(255, 255, 255, 255), 1, "default-bold") dxDrawImage(mainX-80, 50, 200, 100, "img/" .. pWeapon.. ".png") end) how to fix this problem? /sorry for my bad english/ thx the help:D