qbcore-framework / qb-multicharacter

Multi-Character System Used With QB-Core :man: :woman:
GNU General Public License v3.0
32 stars 237 forks source link

Update main.lua #233

Closed Nophobia09 closed 8 months ago

Nophobia09 commented 1 year ago

Fixed issue #231 Getting stuck at black screen when selecting character after changing Config.SkipSelection to true and changing Apartments.Starting to false. The issue seems to be the function incapsulates all spawning conditions while relying on a result from the OwnedApartment callback. This results in getting stuck at black screen when the player does not own an apartment and is attempting to spawn at last location. Also, updated RegisterNuiCallback('closeUI') on line 169 to use argument data as the previous method of using _ resulted in a declaration error on line 170 when attmepting to initialze cData = data.cData

Describe Pull request First, make sure you've read and are following the contribution guidelines and style guide and your code reflects that. Write up a clear and concise description of what your pull request adds or fixes and if it's an added feature explain why you think it should be included in the core.

231

If your PR is to fix an issue mention that issue here

Questions (please complete the following information):

Nophobia09 commented 1 year ago

@GhzGarage correct me if im wrong, but perhaps a better way would be to have the callback part of multicharacter? That way, if apartments aren't used, and houses aren't used, it can just spawn last location. It does that now, but if a user decides not to use qb-apartments, there wouldn't be a callback to allow a spawn at all.

github-actions[bot] commented 10 months ago

This PR has had 60 days of inactivity & will close within 7 days

Nophobia09 commented 10 months ago

Up

github-actions[bot] commented 8 months ago

This PR has had 60 days of inactivity & will close within 7 days