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

Exclude Baltop if player doesnt meet minimum balance // baltop-min-balance #5307

Open
Mddwg opened this issue Apr 11, 2023 · 1 comment · May be fixed by #5394
Open

Exclude Baltop if player doesnt meet minimum balance // baltop-min-balance #5307

Mddwg opened this issue Apr 11, 2023 · 1 comment · May be fixed by #5394
Labels
type: enhancement Features and feature requests.

Comments

@Mddwg
Copy link

Mddwg commented Apr 11, 2023

Feature description

A way to exclude players from /baltop if they dont meet a specific requirement

A few ways to do this could be:

  • If they dont meet a minimum value
    • baltop-requirement: 10000 *or baltop-requirement: $10000
    • (If their balance isnt more than 10,000, they wouldnt show up in /baltop)
  • A playtime based requirement
    • baltop-requirement: playtime *or baltop-requirement: 3600s
      • playtime: 3600 (1 hour in seconds)
    • (If they havent played for more than an hour, they wouldnt show up in /baltop)
  • Balance isnt more than the starting balance set in the config.yml
    • baltop-requirement: starting-balance
    • (If their balance value isnt more than "starting-balance: 10,000", they wouldnt show up)
  • Don't exclude
    • baltop-requirement: none
    • (Wouldnt exclude any players)

*Another way to do the minimum value &/ playtime is to just have the baltop-requirement: need either a $ or s, so money requirement would be baltop-requirement: $10000 and time requirement would be baltop-requirement: 3600s

Like mdcfe#1970 mentioned on the essx-discussion on Discord (message link: https://discord.com/channels/390942438061113344/390943808948535297/1095297860674785431 )

Food for thought:
There should be another setting under "baltop-requirement" (show-negative: true/false) where devs could make it so that negative balances show up or not, (If their balance is negative, it most likely means they're playing on the server)

How the feature is useful

It would allow server developers to hide players who joined, got the starting balance or any kind of money, and then never joined the server. It would make /baltop to be less cramped and show players who actually play.

@Mddwg Mddwg added the type: enhancement Features and feature requests. label Apr 11, 2023
@mdcfe
Copy link
Member

mdcfe commented Apr 11, 2023

I posted a few ideas about this on Discord - just bringing them here so they don't get lost:

  1. We could add a config option to hide players below a certain balance:

    # Don't hide people based on their balance
    baltop-min-balance: none
    # Hide people whose balance is below/equal to the starting balance
    baltop-min-balance: starting-balance
    # Hide people whose balance is below/equal to a custom amount
    baltop-min-balance: 13000
  2. We could track whether or not players' balances have ever changed in their userdata, and then hide players who have never had changes made to their balance.

  3. We could add a more advanced set of filters, which can be enabled/disabled individually:

    # These allow you to limit which players will show in /balancetop.
    baltop-filters:
      # Enable to hide NPCs.
      hide-npcs: true # or false
      # Enable to hide players whose balance is below a set level
      min-balance: none # none, starting-balance, 13000
      # Enable to hide players whose playtime is below a set level
      min-playtime: 2h30m # none, 2h30m
      # Enable to hide players whose balance hasn't changed since they started playing
      hide-no-changes: true

@ayush03dev ayush03dev linked a pull request Jun 16, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants