Jump to content

[HELP] Hydra Fly Mode


delta1337

Recommended Posts

Thank you, ill try it out.

Ive tried it out, and after clicking num_8 nothing happend and and after clicking num_2 also nothing happend

addCommandHandler("getAdjust",function()
      if isPedInVehicle(localPlayer) then
           local adjusted = getVehicleAdjustableProperty(getPedOccupiedVehicle(localPlayer))
           if adjusted then
                outputChatBox(adjusted)
           else
                outputChatBox("Sorry, but your vehicle doesn't have any adjustable properties!")
           end
      else
           outputChatBox("Sorry, but you have to be in a vehicle to use this command!")
      end
end)

bindKey('num_8','down',function()
if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then
local car = getPedOccupiedVehicle(localPlayer)
setVehicleAdjustableProperty(car,2740)
outputChatBox('work')
end
end)


bindKey('num_2','down',function()
if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then
local car = getPedOccupiedVehicle(localPlayer)
setVehicleAdjustableProperty(car,1212)
outputChatBox('work')
end
end)

addEventHandler('onClientVehicleEnter',root,function()
if getElementModel(localPlayer)==511 then
setVehicleAdjustableProperty(source,1212)
end
end)

 

Link to comment
  • Moderators
56 minutes ago, delta1337 said:

Any ideas? Cause im out :/ 

 

I do not understand your problem.

If you are not inside of the vehicle, how else do you want to figure out which vehicle you want to modify? The current code clearly is build to support the vehicle owner only.

Link to comment
  • Moderators
56 minutes ago, delta1337 said:

Why does it works only in hydra?

 

 

On 28/10/2018 at 20:57, delta1337 said:

local car = getPedOccupiedVehicle(localPlayer)

 

On 28/10/2018 at 20:57, delta1337 said:

if getPedOccupiedVehicle(localPlayer) and getElementModel(getPedOccupiedVehicle(localPlayer))==511 then

Because it is programmed like that.

511 is the vehicle ID of a hydra.

https://wiki.multitheftauto.com/wiki/getPedOccupiedVehicle

Feel free to program it to how you think it is suppose to work.

Link to comment
  • Moderators
11 hours ago, delta1337 said:

511 is the beagle id but if i changed it to 520 (hydra id) then it worked

 

 

I based that information on your code, as you said it only works for the hydra.

 

The hydra does have an adjustable property, a beagle does not. That is just a feature from GTA.

 

Yet, I am very sure that somebody can script this effect for the beagle as well. Just it probably cost a lot of $...

Link to comment
  • Moderators
2 hours ago, delta1337 said:

Okay, i found other option to make it fly like that, but my next question is how can i make the heli rotors switch like that?

I mean the textures

 

I still have no clue which one of the two you mean.

  • Heli rotors switch (90-degree)  = model ( ask somebody who edits GTA models )
  • Heli rotors animation (360-degree propeller rotation) = texture + shader ( ask somebody who create shaders, they are easy to find if you search for shader resources )

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...