el_motoblock Posted January 3, 2012 Share Posted January 3, 2012 как называется get у кислорода игрока? для худа нужно просто скажите в вики поищу Link to comment
MX_Master Posted January 4, 2012 Share Posted January 4, 2012 225: UNDERWATER_STAMINA Link to comment
el_motoblock Posted January 4, 2012 Author Share Posted January 4, 2012 Вот хад свой замутил всё хорошо, ну почти... Индикатор кислорода не работает на моём хаде Помогите плиз... function hudvisible () --Gets some elements local hour, mins = getTime () time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins) moneycount=getPlayerMoney( getLocalPlayer() ) money= '$' ..moneycount ammo = getPedTotalAmmo ( getLocalPlayer() ) phealth = math.floor (getElementHealth ( getLocalPlayer() )) armor = math.floor(getPedArmor ( getLocalPlayer() )) oxygen = math.floor(getPedStat ( getLocalPlayer(), 225 )) xR, yR, zR = getElementPosition ( getLocalPlayer() ) GuiLoc = getZoneName ( xR, yR, zR, false ) GuiCity = getZoneName ( xR, yR, zR, true ) --Draws all images dxDrawImage(57.0,632.0,452.0,264.0,"cw_style_hud.dds",0.0,0.0,0.0,tocolor(200,200,200,200),false) --время dxDrawText(tostring (time),246.0,637.0,323.0,653.0,tocolor(255,255,255,255),0.8,"bankgothic","right","center",false,false,false) --бабло dxDrawText(tostring (money),372.0,663.0,491.0,684.0,tocolor(0,150,0,255),1.0,"pricedown","right","center",false,false,false) --здоровье dxDrawText(tostring (phealth),456.0,773.0,498.0,795.0,tocolor(200,20,20,255),1.0,"pricedown","right","center",false,false,false) dxDrawText("Здоровье",449.0,792.0,505.0,809.0,tocolor(255,30,30,255),1.0,"default","center","center",false,false,false) --броня dxDrawText(tostring (armor),399.0,773.0,441.0,795.0,tocolor(50,50,255,255),1.0,"pricedown","right","center",false,false,false) dxDrawText("Броня",395.0,792.0,451.0,809.0,tocolor(30,30,255,255),1.0,"default","center","center",false,false,false) --O2 dxDrawText(tostring (oxygen),342.0,773.0,384.0,795.0,tocolor(150,150,255,255),1.0,"pricedown","right","center",false,false,false) dxDrawText("Кислород",338.0,792.0,394.0,809.0,tocolor(50,50,250,255),1.0,"default","center","center",false,false,false) --патроны dxDrawText(tostring (ammo),434.0,746.0,496.0,766.0,tocolor(50,255,50,255),1.0,"default-bold","right","center",false,false,false) --Название района dxDrawText(tostring (GuiLoc) .. "(" .. tostring (GuiCity) .. ")",67.0,656.0,278.0,686.0,tocolor(255,0,220,255),0.9,"beckett","left","center",false,false,false) --Прорисовка оружия weapon = getPedWeapon ( getLocalPlayer() ) if ( weapon == 0 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/0.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 1 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/1.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 2 ) then -- the elseif works correctly here, we won't use here through. dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/2.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 3 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/3.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 4 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/4.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 5 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/5.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 6 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/6.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 7 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/7.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 8 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/8.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 9 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/9.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 10 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/X.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 11 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/X.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 12 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/X.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 14 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/14.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 15 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/15.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 16 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/16.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 17 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/17.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 18 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/18.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 22 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/22.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 23 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/23.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 24 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/24.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 25 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/25.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 26 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/26.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 27 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/27.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 28 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/28.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 29 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/29.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 30 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/30.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 31 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/31.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 32 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/32.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 33 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/33.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 34 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/34.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 35 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/35.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 36 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/36.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 37 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/37.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 38 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/38.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 39 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/39.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 40 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/40.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 41 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/41.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 42 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/42.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 43 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/43.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 44 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/44_45.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 45 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/44_45.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end if ( weapon == 46 ) then dxDrawImage(434.0,685.0,64.0,64.0,"weap_icons/46.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end --Gets the vehicle & checks if is the ped in a vehicle (for evade the debug spam with bad arguments when someone is on foot) vehicle = getPedOccupiedVehicle(getLocalPlayer()) if ( vehicle ) then --checking -- Gets some vehicle elements (gear, speed in MPH and KMH and health) speedx, speedy, speedz = getElementVelocity ( vehicle ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = math.floor(actualspeed*180) -- Kilometers per hour vehiclehealth = math.floor(getElementHealth ( vehicle )) vehicleName = getVehicleName ( vehicle ) -- And finally, draws --скорость dxDrawText("Скорость КМ/Ч",338.0,844.0,394.0,861.0,tocolor(50,50,250,255),1.0,"default","center","center",false,false,false) dxDrawText(tostring (kmh),342.0,825.0,384.0,847.0,tocolor(150,150,255,255),1.0,"pricedown","right","center",false,false,false) --здоровье тачки dxDrawText("Здоровье тачки",449.0,844.0,505.0,861.0,tocolor(255,30,30,255),1.0,"default","right","center",false,false,false) dxDrawText(tostring (vehiclehealth),456.0,825.0,498.0,847.0,tocolor(200,20,20,255),1.0,"pricedown","right","center",false,false,false) --название тачки dxDrawText(tostring (vehicleName),411.0,863.0,497.0,883.0,tocolor(255,106,0,255),1.0,"bankgothic","right","center",false,false,false) end end addEventHandler ("onClientRender", root, hudvisible ) --This will disable original hud function hideall(player) showPlayerHudComponent ( "ammo", false ) showPlayerHudComponent ( "area_name", false ) showPlayerHudComponent ( "armour", false ) --showPlayerHudComponent ( "breath", false ) showPlayerHudComponent ( "clock", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "vehicle_name", false ) showPlayerHudComponent ( "weapon", false ) end addEventHandler ( "onClientResourceStart", resourceRoot, hideall ) function showall(player) showPlayerHudComponent ( "ammo", true ) showPlayerHudComponent ( "area_name", true ) showPlayerHudComponent ( "armour", true ) --showPlayerHudComponent ( "breath", true ) showPlayerHudComponent ( "clock", true ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "vehicle_name", true ) showPlayerHudComponent ( "weapon", true ) end addEventHandler ( "onClientResourceStop", resourceRoot, showall ) Link to comment
Kenix Posted January 4, 2012 Share Posted January 4, 2012 getPedStat ( getLocalPlayer(), 225 )) Это показывает какой у тебя скилл а не сколько кислорода у тебя. 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