Whit3 Posted June 13, 2014 Share Posted June 13, 2014 This script work just in 1 resolution ( 1280x1024 ) in the other one the circle are moved or larger What's the problem? local rx,cx = guiGetScreenSize() local posx = 0.129 * rx local posy = 0.837 * cx local size = 0.116 * cx function healthstatus ( ) local target = getCameraTarget() if not target then return end if not (getElementType(target) == "vehicle") then return end local car = target if ( isPedInVehicle ( localPlayer ) == false ) then return false end local health = getElementHealth ( car ) local name = getVehicleName ( car ) local currenthealth = math.max(health - 250, 0)/750 dxDrawPartialCircle(posx, posy, size,2,0,currenthealth*360) end addEventHandler ( "onClientRender", root, healthstatus ) Link to comment
Moderators IIYAMA Posted June 13, 2014 Moderators Share Posted June 13, 2014 Enable this: https://wiki.multitheftauto.com/wiki/Dx ... entEnabled In the dxDrawPartialCircle function block. Link to comment
Moderators IIYAMA Posted June 14, 2014 Moderators Share Posted June 14, 2014 Show it....... Link to comment
Whit3 Posted June 14, 2014 Author Share Posted June 14, 2014 That's all.. but you mean screenshots? Link to comment
Twisted Posted June 14, 2014 Share Posted June 14, 2014 That's all..but you mean screenshots? He means copy and paste the function into your script. Link to comment
xXMADEXx Posted June 15, 2014 Share Posted June 15, 2014 He is saying that the circle is just moved and different sizes, not that the function isn't working. You have to use the function guiGetScreenSize with some basic math to make it the same size & same position in all resolutions. Link to comment
Moderators Citizen Posted June 15, 2014 Moderators Share Posted June 15, 2014 This script work just in 1 resolution ( 1280x1024 ) Are you sure about the resolution ? Because I tried a lot of settings for 1280x1024, and this is the best I got so far: So please check again for which resolution, this script works, and also check in video settings the HUD Match aspect ratio check box (activated or not) and the Aspect Ratio (if it's auto, please select a real one that work, so I can set the same in my settings). Link to comment
Moderators IIYAMA Posted June 15, 2014 Moderators Share Posted June 15, 2014 The math is correct, the ratio isn't, which will be fixed with this function. Enable this:https://wiki.multitheftauto.com/wiki/Dx ... entEnabled In the dxDrawPartialCircle function block. Link to comment
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