kashtesov Posted February 12, 2012 Share Posted February 12, 2012 Как сделать кислород н худе? function DXdraw() --Variables sWidth, sHeight = guiGetScreenSize() -- Getting the screen size health = getElementHealth( getLocalPlayer() ) lineLength1 = 140 * ( health / 100 ) -- Health bar armor = getPedArmor( getLocalPlayer() ) lineLength2 = 140 * ( armor / 100 ) -- Armor bar ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip totalammo2 = getPedTotalAmmo(getLocalPlayer()) showammo1 = ammoinclip showammo2 = totalammo showammo3 = totalammo2 moneycount=getPlayerMoney(getLocalPlayer()) money= '$' ..moneycount -- Money local hour, mins = getTime () time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins) -- Time. This one makes the minutes always show by 2 digits (3:05 instead of 3:5) local wantedlevel = getPlayerWantedLevel (getLocalPlayer()) --Getting the player's wanted level. -------- Dynamic health colour thanks to 50p ---------- tick = getTickCount () -- For active health bar local maxHealth = 100; -- get max health stat local colourPercent = ( health / maxHealth ) * 200; local red, green; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red = 200; green = ( health / 50 ) * ( colourPercent * 2 ); else green = 200; red = 200 - ( ( health - 50 ) / 50 ) * 200; end -- For inactive health bar local maxHealth = 75; -- get max health stat local colourPercent1 = ( health / maxHealth ) * 75; local red1, green1; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red1 = 75; green1 = ( health / 50 ) * ( colourPercent1 * 2 ); else green1 = 75; red1 = 75 - ( ( health - 50 ) / 50 ) * 75; end local color1 = tocolor( red1, green1, 0, 150 ) local color2 = tocolor( red, green, 0, 200 ) -- For the health bar if getTickCount () %0 < 0 and health <= 0 and armor <=0 then -- If health is less than 20%, armor is 0%, the health bar will blink by hiding the health bar every 1.5 seconds. else dxDrawRectangle(sWidth-202,sHeight-87,144.0,14.0,tocolor(50,50,50,200), false) -- Health inactive bar dxDrawRectangle(sWidth-200,sHeight-85,lineLength1,10.0,color2,false) --Health active bar end if armor <= 0 then else dxDrawRectangle(sWidth-200,sHeight-100,lineLength2,10.0,tocolor(0,0,200,200),false) -- Armor active bar dxDrawRectangle(sWidth-202,sHeight-102,144.0,14.0,tocolor(50,50,50,200),false) -- Armor inactive bar end Link to comment
Scripting Moderators Sarrum Posted February 12, 2012 Scripting Moderators Share Posted February 12, 2012 Уже обсуждалось. Никак. Link to comment
kashtesov Posted February 12, 2012 Author Share Posted February 12, 2012 Уже обсуждалось. Никак. не видел.. печально. просто уберу полоску кислорода чтобы не мешала=) Link to comment
Scripting Moderators Sarrum Posted February 12, 2012 Scripting Moderators Share Posted February 12, 2012 viewtopic.php?f=141&t=38576 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