Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local veh = getPedOccupiedVehicle (getLocalPlayer())
- if veh then
- local maxfuel = getElementData(veh,"maxfuel")
- local fuel = getElementData(getElementData(veh,"parent"),"fuel")
- local needengine = getElementData(veh,"needengines")
- local needtires = getElementData(veh,"needtires")
- local needparts = getElementData(veh,"needparts")
- local car_hp = getElementHealth(getPedOccupiedVehicle (getLocalPlayer()))
- local engine = getElementData(getElementData(veh,"parent"),"Äâčăŕňĺëü_inVehicle") or 0
- local tires = getElementData(getElementData(veh,"parent"),"Ęîëĺńî_inVehicle") or 0
- local parts = getElementData(getElementData(veh,"parent"),"Parts_inVehicle") or 0
- local offset = dxGetFontHeight(1.02,"default-bold")
- if engine == needengine then
- r,g,b = 84, 159, 40
- else
- r,g,b = 235, 36, 36
- end
- dxDrawImage(screenWidth * 0.041, screenHeight * 0.24, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/1.png", 0, 0, 0, tocolor(r,g,b))
- if tires == needtires then
- r,g,b = 84, 159, 40
- else
- r,g,b = 235, 36, 36
- end
- dxDrawImage(screenWidth * 0.041, screenHeight * 0.275, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/2.png", 0, 0, 0, tocolor(r,g,b))
- dxDrawText (tires.."/"..needtires.."",screenWidth*0.043 , screenHeight*0.3,screenWidth*0.003 , screenHeight*0.003,tocolor ( 85, 107, 47, 220 ), 1.02, "default-bold" )
- if parts == needparts then
- r,g,b = 84, 159, 40
- else
- r,g,b = 235, 36, 36
- end
- dxDrawImage(screenWidth * 0.041, screenHeight * 0.314, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/3.png", 0, 0, 0, tocolor(r,g,b))
- if car_hp >= 700 and car_hp <=1000 then
- r,g,b = 84, 159, 40
- end
- if car_hp >= 400 and car_hp <=699 then
- r,g,b = 163, 148, 21
- end
- if car_hp >= 100 and car_hp <=399 then
- r,g,b = 168, 50, 2
- end
- if car_hp >= 0 and car_hp <= 100 then
- r,g,b = 235, 36, 36
- end
- dxDrawImage(screenWidth * 0.041, screenHeight * 0.354, screenHeight * 0.048, screenHeight * 0.026, "images/carhud/4.png", 0, 0, 0, tocolor(r,g,b))
- if fuel <= 10 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/010.png" )
- elseif fuel <= 20 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/1020.png" )
- elseif fuel <= 30 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/2030.png" )
- elseif fuel <= 40 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/3040.png" )
- elseif fuel <= 50 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/4050.png" )
- elseif fuel <= 70 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/5070.png" )
- elseif fuel >= 70 then
- dxDrawImage ( screenWidth*0.027, screenHeight*0.23, screenWidth*0.013, screenHeight*0.22, "images/carhud/70100.png" )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement