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

Vehicle Owners Don't Have Keys #139

Closed
Manason opened this issue Oct 1, 2024 · 0 comments · Fixed by #140
Closed

Vehicle Owners Don't Have Keys #139

Manason opened this issue Oct 1, 2024 · 0 comments · Fixed by #140
Labels
bug Something isn't working

Comments

@Manason
Copy link
Member

Manason commented Oct 1, 2024

Summary

Vehicle owners aren't guaranteed to have keys to the vehicle

Reproduction

  1. Set the logout key retention time to 0
  2. Take a vehicle you own out of the garage, you get keys to it
  3. Relog
  4. You no longer have keys to the vehicle

Expected behavior

Vehicle owners should always be able to access their own vehicles

Actual behavior

There is no mechanism to give owners vehicle keys. Only the person who takes the vehicle out of the garage gets the keys

Additional context

Solution: add a statebag change handler for vehicleid which sets the owner's citizenid as a new statebag key on the vehicle. Then when checking the HasKey() function, if the player doesn't have keys and the citizenid matches the vehicle owner, give them keys

Current Version

latest commit

Custom Resources

N/A

@Manason Manason added bug Something isn't working need repro This bug report needs confirmation and removed need repro This bug report needs confirmation labels Oct 1, 2024
@qbox-duck qbox-duck bot added this to Issues Oct 1, 2024
@github-project-automation github-project-automation bot moved this to Todo in Issues Oct 1, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues Oct 1, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant