altv-issues
altv-issues copied to clipboard
Misunderstandable use of SetVehicleExtra (serverside)
Description of the problem
currently by using extras for vehicle JS: veh.setExtra
/C#: veh.ToggleExtra
the second parameter state
is wrong to understand.
If you set state = true, you expect the extra to be set, but it is not. You have to set state = false.
The native for that has disable
as second parameter and here its seem state
works as "disable"
Reproduction steps
Spawn vehicle "buccaneer2"
As JS:
Execute server-side method veh.setExtra(2, false)
As C#
Execute server-side method veh.ToggleExtra(2, false)
The roof will be removed.
Expected behaviour
Spawn vehicle "buccaneer2"
As JS:
Execute server-side method veh.setExtra(2, true)
As C#
Execute server-side method veh.ToggleExtra(2, true)
set True to remove the roof.
Additional context
No response
Operating system
Windows 11
Version
12.10 (release)
I can confirm this behaviour but changing it should be should be released as a breaking change because it would break a lot of scripts.
yeah understandable a other way can by rename the paramter to disable on cpp-sdk and then rename it on the modules