qbcore-framework / qb-smallresources

A compilation of small resources combined into one
GNU General Public License v3.0
50 stars 348 forks source link

Add AFK Timer in Character Selection #331

Closed DuoTheDev closed 11 months ago

DuoTheDev commented 1 year ago

Describe Pull request Implements suggestion brought up in #281

This PR aims to add a configurable afk timer for players in the character selection screen. This also accounts for the time after the player selects a character and sits in the "select location" screen. The timer only stops when they spawn in on their character. Before this change, there was no afk timer for players who were not currently spawned into a character which subsequently allowed them to remain idle on the server for any period of time.

I am also open to hearing feedback regarding the default AFK time I created.

Questions (please complete the following information):

S33G commented 1 year ago

Thanks so much for submitting this. This is a fantastic addition, however - this code is already difficult to read so I did a refactor using your code inspiration.

Would love to know what you think. https://github.com/qbcore-framework/qb-smallresources/pull/333

Cheers!

github-actions[bot] commented 11 months ago

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