Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getVehicleWheelFrictionState not working on bikes #3955

Open
1 task done
thealex-br opened this issue Jan 13, 2025 · 0 comments
Open
1 task done

getVehicleWheelFrictionState not working on bikes #3955

thealex-br opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@thealex-br
Copy link

thealex-br commented Jan 13, 2025

Describe the bug

getVehicleWheelFrictionState throws ERROR: script/file.lua:line Invalid vehicle type when used in non "Automobile" vehicle types, this function is very useful to detect vehicle behavior and should work in all vehicle types, or return false instead

Steps to reproduce

  1. enable debugscript 3

  2. run:

addEventHandler("onClientRender", root, function ()
    local veh = getPedOccupiedVehicle (localPlayer)
    
    if not veh then
        return false
    end
    
    dxDrawRectangle (0, 0, 300, 140, tocolor (0, 0, 0, 150))
    dxDrawText ("FRICTION FRONT LEFT = ".. getVehicleWheelFrictionState (veh, 0), 8, 10, 290, 40, tocolor (255, 255, 255), 1.5)
    dxDrawText ("FRICTION FRONT RIGHT = ".. getVehicleWheelFrictionState (veh, 2), 8, 40, 290, 70, tocolor (255, 255, 255), 1.5)
    dxDrawText ("FRICTION REAR LEFT = ".. getVehicleWheelFrictionState (veh, 1), 8, 70, 290, 100, tocolor (255, 255, 255), 1.5)
    dxDrawText ("FRICTION REAR RIGHT = ".. getVehicleWheelFrictionState (veh, 3), 8, 100, 290, 130, tocolor (255, 255, 255), 1.5)
end)
  1. enter a bike
  2. see errors

Version

Client: v1.6-release-22894 (Windows 10, 64-bit)
Server: v1.6-release-22649 (Linux, 64-bit)

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@thealex-br thealex-br added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant