1
Deleted Crap / Re: Suggest some bullshit... OH WAIT, SARP IS BULLSHIT LOL
« on: June 11, 2012, 02:59:47 pm »Vehicle health by PSNgood one but to tell you something ! even i can copy scripts and change author nameCode: [Select]----------------------------------------------------------------
-------------------- Digital Vehicle Health --------------------
-------------------- Scripted by PSN ----------------
function vehicleHealth()
local vehicle = getPedOccupiedVehicle( localPlayer )
if ( vehicle ) then
local vehicleHealth = getElementHealth( vehicle )
local scx, scy = guiGetScreenSize()
if ( math.floor( vehicleHealth / 10 ) ) > 70 then
-- If the vehicle health is higher then 70% the health is showed in a white color
dxDrawText( ( math.floor( vehicleHealth / 10 ) ) .. "% Health", scx - 125,scy - 70,scx,scx,tocolor(255,255,255,255),0.9, "bankgothic","right","top",false,false,false)
elseif ( math.floor( vehicleHealth / 10 ) ) > 40 and ( math.floor( vehicleHealth / 10 ) ) < 70 then
-- If the vehicle health is between 40% and 70% the health is showed in a orange color
dxDrawText( ( math.floor( vehicleHealth / 10 ) ) .. "% Health", scx - 125,scy - 70,scx,scx,tocolor(225,165,0,255),0.9, "bankgothic","right","top",false,false,false)
elseif ( math.floor( vehicleHealth / 10 ) ) < 40 then
-- If the vehicle health is lower then 40% the health is showed in a red color
dxDrawText( ( math.floor( vehicleHealth / 10 ) ) .. "% Health", scx - 125,scy - 70,scx,scx,tocolor(225,0,0,255),0.9, "bankgothic","right","top",false,false,false)
end
end
end
addEventHandler("onClientRender", root, vehicleHealth
MetaCode: [Select]<meta>
<info author="PSN" version="1.0" type="script" name="Vehicle Health" description="Vehicle Health" />
<script src="vehicleHealth.lua" type="client"/>
</meta>