Search the Community
Showing results for tags 'reload hydra'.
-
Hi ,I do not walk, you know why? The script found it in the community but does not walk The first picture shows how the script is local w, h = guiGetScreenSize() local resx local resy function resY(value) if h <= 600 then resy = 600 elseif h <= 768 then resy = 768 elseif h <= 720 then resy = 720 elseif h <=900 then resy = 900 elseif h <=1000 then resy = 1000 else resy = 1080 end return (value/resy) * h end function resX(value) if w <= 800 then resx = 800 elseif w <= 1024 then resx = 1024 elseif w <= 1280 then resx = 1280 elseif w <=1400 then resx = 1400 elseif w <= 1650 then resx = 1650 else resx = 1920 end return (value/resx) * w end local MainX = (w/2-resX(190))/w local MainY = (h/2-resY(320))/h local progress = 0 local activo = false local ancho = 5 local timer local tiempo = 0 function _dxDrawRectangle(x,y,w,h,r,g,b,a) dxDrawRectangle(x,y,w,h,tocolor(r,g,b,80*a)) dxDrawRectangle(x+resY(2),y+resY(2),w-resY(4),h-resY(4),tocolor(r,g,b,170*a)) end function principal (thePlayer) local theVehicle = getPedOccupiedVehicle(thePlayer) if ( getElementModel ( theVehicle ) == 520 ) then setElementData(thePlayer,"on",true) addEventHandler("onClientRender",getRootElement(),start) end end addEventHandler ( "onClientVehicleEnter", getRootElement(), principal ) function salida (player) setElementData(player,"on",false) toggleControl ( "vehicle_secondary_fire", true ) removeEventHandler("onClientRender",getRootElement(),start) activo = false progress= 0 ancho = 0 tiempo = 0 end addEventHandler ( "onClientVehicleExit", getRootElement(), salida ) function start () if not getElementData(getLocalPlayer(),"on") then return end init() if activo then progress = progress+0.00010 ancho,tiempo = interpolateBetween(ancho,tiempo,0,299,100,0,progress,"Linear") end _dxDrawRectangle(MainX+resX(680),MainY+resY(850),resX(300),resY(40),0,0,0,180) _dxDrawRectangle(MainX+resX(681),MainY+resY(850),resX(ancho),resY(40),0,0,255,255) dxDrawImage(MainX+resX(620),MainY+resY(850),resX(40),resY(40),"img.png",0,0,0,tocolor(0,0,180,255)) dxDrawText("Misil:"..math.ceil(tiempo).."%",MainX+resX(775),MainY+resY(860),w,h,tocolor(255,255,255,255),1.5,"default-bold") end function active() toggleControl ( "vehicle_secondary_fire", true ) activo = false progress= 0 end function init() if not getElementData(getLocalPlayer(),"on") then return end local control = getControlState ("vehicle_secondary_fire") if control == true then toggleControl ( "vehicle_secondary_fire", false ) activo = true progress= 0 ancho = 0 tiempo = 0 if isTimer(timer) then killTimer(timer) end timer = setTimer(active,9000,1) else end end <meta> <script src = "script.lua" type="client" /> <file src="img.png" /> </meta> img