Kors Posted January 30, 2018 Posted January 30, 2018 Why dont work this resource for other players, only work on my pc local localPlayer = getLocalPlayer () local theTimer2 = nil local color1 = tocolor( 0, 0, 0, 255 ) local color2 = tocolor( 255, 0, 0, 150 ) local color3 = tocolor( 255, 200, 0, 150 ) local color4 = tocolor( 2, 59, 242, 150 ) local font = dxCreateFont ("myriadproregular.ttf",14) local megjelenit = true rot = 0 unbindKey ( "home" ) setElementData(localPlayer,"hud:main",true,false) function funkcio() setElementHealth(getLocalPlayer(), getElementHealth(getLocalPlayer()) - 1) end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end function hudStatusz(statusz) megjelenit = statusz end function getHudStatusz() return megjelenit end function hud() local hp = tonumber(getElementHealth(getLocalPlayer())) local armor = tonumber(getPedArmor(getLocalPlayer())) local money = getPlayerMoney(localPlayer) local scx, scy = guiGetScreenSize() local svx, svy = guiGetScreenSize() local x, y = scx-193 - 47, 10 local xx = svx - 200 local xxx = scx + 50 img = dxDrawImage(40, 799, 374, 91, "bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText(math.round(hp,0).."%", 110, 827, 7, 22.5, tocolor ( 200, 200, 200 ), 0.8, font, "left","top",false,false,true,true) dxDrawText(math.round(armor,0).."%", 330, 827, 7, 22.5, tocolor ( 200, 200, 200 ), 0.8, font, "left","top",false,false,true,true) dxDrawText(math.round(money,0).."$", 217, 827, 7, 22.5, tocolor ( 200, 200, 200 ), 0.8, font, "left","top",false,false,true,true) end addEventHandler("onClientRender", getRootElement(), hud) function penz_darabolas(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1 %2') if (k==0) then break end end return formatted end function onClientRenderR() local theVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) if theVehicle then local vehmodel = getElementModel(theVehicle) if vehmodel == 481 or vehmodel == 509 or vehmodel == 510 then speed = exports.rp_core:getVehicleVelocity(theVehicle) if speed > 40 then toggleControl ( "accelerate", false ) elseif not isControlEnabled("accelerate") then toggleControl ( "accelerate", true ) end end end end addEventHandler("onClientRender", getRootElement(), onClientRenderR) My gta, Spoiler others Spoiler
NeXuS™ Posted January 30, 2018 Posted January 30, 2018 Because you use absolute values. Probably they have a lower screen resolution and the Y coordinate (827) is out of their actual screen. Did I help you? NeXuS™#0001
Kors Posted January 31, 2018 Author Posted January 31, 2018 How fix , I need show hp/armor/money on left,bot, screen
NeXuS™ Posted January 31, 2018 Posted January 31, 2018 Getting the screen size by guiGetScreenSize and calculating with that. Did I help you? NeXuS™#0001
Kors Posted February 1, 2018 Author Posted February 1, 2018 Can anyone help me fix this code ? Set position left bot , multi screen
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now