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

[SUGGESTION] AFK Timer! (reaaally need this!) #207

Closed nzkfc closed 1 year ago

nzkfc commented 1 year ago

Is your feature request related to a problem? Please describe. When you sit on the character screen, you don't get kicked for being AFK.

We have people that join our city in the morning, sit on character screen and then go to work for 8 hours so they can play at night if the server is full.

Describe the feature you'd like Config to set the minutes you get kicked for being AFK on the character selection screen

Describe alternatives you've considered N/A

Additional context Not sure if this affects the player when creating a new character and spawning in, I assume qb-spawn and such takes over when they first spawn into apartment and make their character, so that would be just something to ensure isn't affected.

Z3rio commented 1 year ago

That is handled by qb-smallresources, not qb-multicharacter.

https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 You would probably just want to remove all the references of isLoggedIn from here.

nzkfc commented 1 year ago

I don't think so.

That handles spawned in players, not when on character select screen.

I know because I have to kick 40 people a night abusing it...

On Mon, 1 May 2023, 3:26 am Zerio, @.***> wrote:

That is handled by qb-smallresources, not qb-multicharacter.

https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 You would probably just want to remove all the references of isLoggedIn from here.

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-multicharacter/issues/207#issuecomment-1529053692, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.***>

Z3rio commented 1 year ago

I don't think so. That handles spawned in players, not when on character select screen. I know because I have to kick 40 people a night abusing it... On Mon, 1 May 2023, 3:26 am Zerio, @.> wrote: That is handled by qb-smallresources, not qb-multicharacter. https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 You would probably just want to remove all the references of isLoggedIn from here. — Reply to this email directly, view it on GitHub <#207 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.>

Okay, well matter a fact it would actually be what you want.

isLoggedIn only gets set to true when choosing an character, hence why you dont get kicked when in the char menu and hence why you would want to remove it to accomplish this.

Here is an modified version of qb-smallresources from me which you could use, it should include an config value to toggle this. https://github.com/qbcore-framework/qb-smallresources/pull/375

nzkfc commented 1 year ago

OK so why do you guys keep suggesting to people in here to make custom edits instead of what the dam suggestion feature is for?

Im asking for a feature (config) to enable afk kick before character select to be put into the default core for the community to enjoy, one single person shouldn't decide what is or isn't going to happen on an open source framework like this, it should all be decided based on priority and community benefit and/or need. This is very low priority, sure, but still valid.

On Sat, 6 May 2023, 5:03 am Zerio, @.***> wrote:

I don't think so. That handles spawned in players, not when on character select screen. I know because I have to kick 40 people a night abusing it... … <#m-728571989665095176> On Mon, 1 May 2023, 3:26 am Zerio, @.> wrote: That is handled by qb-smallresources, not qb-multicharacter. https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 You would probably just want to remove all the references of isLoggedIn from here. — Reply to this email directly, view it on GitHub <#207 (comment) https://github.com/qbcore-framework/qb-multicharacter/issues/207#issuecomment-1529053692>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.>

Okay, well matter a fact it would actually be what you want.

isLoggedIn only gets set to true when choosing an character, hence why you dont get kicked when in the char menu and hence why you would want to remove it to accomplish this.

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-multicharacter/issues/207#issuecomment-1536537843, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHOJUT3QVNDBMCDN67LXEUXELANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.***>

Z3rio commented 1 year ago

OK so why do you guys keep suggesting to people in here to make custom edits instead of what the dam suggestion feature is for? Im asking for a feature (config) to enable afk kick before character select to be put into the default core for the community to enjoy, one single person shouldn't decide what is or isn't going to happen on an open source framework like this, it should all be decided based on priority and community benefit and/or need. This is very low priority, sure, but still valid. On Sat, 6 May 2023, 5:03 am Zerio, @.> wrote: I don't think so. That handles spawned in players, not when on character select screen. I know because I have to kick 40 people a night abusing it... … <#m-728571989665095176> On Mon, 1 May 2023, 3:26 am Zerio, @.> wrote: That is handled by qb-smallresources, not qb-multicharacter. https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 https://github.com/qbcore-framework/qb-smallresources/blob/main/client/afk.lua#L45 You would probably just want to remove all the references of isLoggedIn from here. — Reply to this email directly, view it on GitHub <#207 (comment) <#207 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU https://github.com/notifications/unsubscribe-auth/ABGHUHIC35TLX5MXYJX5URTXD2ACFANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.> Okay, well matter a fact it would actually be what you want. isLoggedIn only gets set to true when choosing an character, hence why you dont get kicked when in the char menu and hence why you would want to remove it to accomplish this. — Reply to this email directly, view it on GitHub <#207 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHOJUT3QVNDBMCDN67LXEUXELANCNFSM6AAAAAAXQZ2SCU . You are receiving this because you authored the thread.Message ID: @.>

I don't decide anything for QBCore, I haven't been a dev team member for at least a month now, so I'm unsure how that would be my fault.

No one has suggested that you "make something custom", what I told you is that this is the wrong place to ask this. Aswell as including an exact instruction on how to do this, aswell as now creating an PR with this change present.

What I sent in my previous message was exactly what you are describing in your reply, a PR that has a config option to switch between this, ready for you to simply download, which is hopefully getting merged in the future.

I would recommend you to re-read the text in my previous replies since it includes all the information you need.

Have a great rest of your day/night.

nzkfc commented 1 year ago

@Z3rio ahh right I didn't see your PR bit on mobile, just say you pointing to the smallresources part and then saying you can modify it.