Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Pull request
This pull request refactors the
client/main.luascript to improve vehicle handling and code consistency. The main focus is on standardizing function calls, enhancing vehicle blacklist management, and ensuring proper argument usage for game-native functions. Below are the most important changes:Vehicle Blacklist Management
isBlacklistedVehicle,addNoLockVehicles, andremoveNoLockVehiclesfunctions to be defined earlier in the file to make them local (and still work) following the lowercase first letter of the function. [1] [2]Standardization of Native Function Calls
GetVehiclePedIsIn,IsPedInVehicle, andIsPedDeadOrDyingthroughout the file by explicitly passing thelastVehicleargument (usuallyfalse), ensuring consistent and expected behavior. [1] [2] [3] [4] [5] [6]Command Registration Improvements
togglelocksandengine) to include thefalseargument, clarifying that these commands should not be restricted to the game's console.Vehicle Door and Trunk Handling
SetVehicleDoorOpenandSetVehicleDoorShutcalls inToggleVehicleTrunkto include all arguments, aligning with native function signatures and preventing potential issues.Minor Code Consistency Fixes
SetPedFleeAttributesandSetTextProportionalto use boolean values for clarity and consistency with native expectations. [1] [2]If your PR is to fix an issue mention that issue here
Questions (please complete the following information):