-
Notifications
You must be signed in to change notification settings - Fork 85
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
1.3.0 - Passenger control update #16
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The driver and passenger of a vehicle should now be able to run radar independently, this is a very early implementation as there is no syncing between players. If the driver locks a speed, the passenger's radar will be unchanged, and so on.
Key binds now get registered only when the player has spawned in, rather than when the code gets run at the bottom of the file.
The key lock message now reads "Radar key binds enabled" and "Radar key binds blocked". Green and red are also used to signify the state of the key binds, this hopefully makes it a bit more clear what it does, as well as the state of the key lock.
If the resource's name is not wk_wars2x, then the server console will receive an error.
If CONFIG.allow_passenger_control is set to true, then the passenger can turn on the power.
The system was restoring the data, but not updating the NUI side.
This was caused because I used the RADAR:IsMenuOpen() function to control if audio should be played. This is so if one player is in the operator menu, and the other locks a speed, the audio is not played for the player in the operator menu. The variable 'isMenuOpen' just needed inverting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New
config.lua
file that control this: passenger view and passenger control. When passenger view is enabled, the passenger will be able to open their remote and toggle their displays for the radar and plate reader. When passenger control is enabled, the passenger will be able to use all the radar and plate reader functions like normal, but it is synced between the driver and passenger.config.lua
to automatically lock speeds only if the speeding vehicle has a real player as the driver./reset_radar_data
to indicate the resource's KVPs have been reset./reset_radar_data
command.config.lua
for users of Sonoran CAD. When enabled, this reduces the amount that the plate reader system triggers thewk:onPlateScanned
event, so it will only trigger the event if the scanned plate has a player in it or belongs to a player.config.lua
to set the default fast lock state and fast limit for the operator menu. This only applies if fast lock is enabled.Changes
wk_wars2x
as the resource name. If the resource name is notwk_wars2x
, an error message will be printed to the server console, and the key binds will not be registered client side.config.lua
.Fixes