multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.42k stars 438 forks source link

setAnalogControlState isn't working #3070

Open Lord-Henry opened 1 year ago

Lord-Henry commented 1 year ago

Describe the bug

This only happens on airplanes and helicopters. The setAnalogControlState function returns false and doesn't work when using the control name "vehicle_look_left", "vehicle_look_right" on an airplane.

This is because those controls uses by default "true/false" behaviour on land vehicles to control de camera. But on airplanes, it controls the airplane rudder angle to make the airplane go left/right while on ground. In this situation, the analog control should work so the plane can perform a more precise curve.

The function setControlState works normally at this situation. But it's not a precise control.

Steps to reproduce

  1. Go to any airport.
  2. Create any airplane and get in.
  3. Run this code: (client-side) setAnalogControlState ("vehicle_look_left", 1)
  4. It doesn't work.
  5. Then, run this code: (client-side) setPedControlState ("vehicle_look_left", true)
  6. Now works.

Version

Client: v1.6-release-21852 Server: v1.6-release-21852

Windows 10 - Home

Additional context

The same on helicopters. setAnalogControlState doesn't work using those control names, but setPedControlState works.

Relevant log output

No response

Security Policy

TracerDS commented 1 year ago

vehicle_look_left is not a valid analog control. Thats why its returning false. List of all valid analog controls here

Lord-Henry commented 1 year ago

I know. But it should be valid while on airplane or helicopter.