-
-
Notifications
You must be signed in to change notification settings - Fork 488
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
-
enable
debugscript 3
-
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)
- enter a bike
- 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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working