andiyer Posted December 1, 2012 Posted December 1, 2012 Hola quiero saber como hacer para que el jetpack se pueda quitar y colocar en el aire cuando cae el jugador quitarlo y colocarselo repetitivamente
AhmadQTR Posted December 1, 2012 Posted December 1, 2012 English please, search for your native language HERE Nobody is perfect , I'm nobody. Skype : ahmad.nasser37
Castillo Posted December 1, 2012 Posted December 1, 2012 Tema movido a Spanish > Scripting. Editando el script que te da el jetpack. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted December 2, 2012 Posted December 2, 2012 Anda a la carpeta de "mabako-services/server/shops.lua" y busca la funcion: "switchJetpack" y remplazala con esta: function switchJetpack( source ) if( doesPedHaveJetPack( source ) ) then removePedJetPack( source ) elseif( getElementData( source, "jetpackFuel" ) and getElementInterior( source ) == 0 ) then if( tonumber( getElementData( source, "jetpackFuel" ) ) > 1 ) then givePedJetPack( source ) end end end Luego anda a "mabako-services/client/jetpack_control.lua" y busca la funcion: "updateFuel" y remplazala con esta: function updateFuel( ) if( not getElementData( _local, "jetpackFuel" ) ) then return end local currentFuel = tonumber( getElementData( _local, "jetpackFuel" ) ) if( (getElementInterior( _local ) > 0 and guiGetVisible( jMenu ) ) or currentFuel == 0 ) then toggleJetpackWindow( false ) elseif( getElementInterior( _local ) == 0 and not guiGetVisible( jMenu ) ) then toggleJetpackWindow( true ) end if( doesPedHaveJetPack( _local ) ) then if( currentFuel > 0 ) then local veloX, veloY, veloZ = getElementVelocity( _local ) if( not veloX ) then return end if( veloZ < 0 ) then veloZ = 0 end -- literally going down is ignored, since you dont need fuel for that currentFuel = currentFuel - getDistanceBetweenPoints3D( veloX, veloY, veloZ, 0, 0, 0 ) * jetpackVeloMultiplier if( currentFuel < 1 ) then currentFuel = 0 end if( currentFuel == 0 ) then -- down, down, down toggleControl( "sprint", false ) setControlState( "jump", true ) outputChatBox( "Your JetPack ran out of fuel!", 255, 255, 0 ) end setElementData( _local, "jetpackFuel", currentFuel ) else if( currentFuel == 0 ) then triggerServerEvent( "forceJetpackRemove", _local ) end end end local shownValue = math.floor(currentFuel/jetpackMaxFuel*100) if( guiGetText( jText ) ~= shownValue .. "%" ) then guiProgressBarSetProgress( jBar, shownValue ) guiSetText( jText, shownValue .. "%" ) end end ADVERTENCIA: PUEDE QUE EL NOMBRE DEL RECURSO NO LO TENGAS COMO "mabako-services". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
andiyer Posted December 3, 2012 Author Posted December 3, 2012 Gracias men por tu ayuda te aghradesco men buena ayuda thanks you !
Castillo Posted December 3, 2012 Posted December 3, 2012 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts