Guten Tag,
egend wie funkt das Waffenüberhitzen script nicht!
Es kommen keine Error nix!
Kann mir da jemand weiter helfen?
Lua
rauch = 0
addEventHandler("onClientRender",root,
function()
dxDrawText("OverPowerd :"..rauch.."",680.0,634.0,1173.0,755.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false)
dxDrawRectangle ( 780.0,634.0, 300, 22, tocolor(1,1,1) )
dxDrawRectangle ( 790.0,634.0, rauch, 16, tocolor(255,0,0) )
end
)
function kühlerkauf ()
givePlayerMoney ( -50 )
setElementData(kühl, true, player)
end
addCommandHandler("buykühler", kühlerkauf)
addEventHandler ( "onClientPlayerWeaponFire", getRootElement(),
function()
if getElementData ( kühl, true) then
rauch = rauch + 5
else
rauch = rauch + 10
if (rauch >= 275) or (rauch == 275) then
b1x, b1y, b1z = getPedBonePosition ( rofl, 24 )
fxAddBulletImpact ( b1x, b1y, b1z, b1x, b1y, b1z, 5, 50, 1.0 )
overpower = setTimer(rauch55, 5000, 0)
toggleControl ( "fire", false )
-- setTimer(toggleControl ( "fire", true ), 9000, 1)
else
toggleControl ( "fire", true )
-- killTimer ( over )
end
end
)
function rauch55()
if getElementData ( kühl, true) then
rauch = rauch - 10
else
rauch = rauch -5
if (rauch <= 0) or (rauch == 0) then
rauch = 0
toggleControl ( "fire", true )
--killTimer ( overpower )
end
end
end
end
Alles anzeigen