Jump to content

1 Screenshot

  • 28.8k
  • 347
  • 4.04 kB
  • Update details
    v1.0.0
    Released
    Download size4.04 kB
    Total versions2
    Time between versions 3 days
    Typical update pace About every 3 days
    Freshness 987 days ago

This area is for discussion and questions. Please use the support area for reporting issues or getting help.

Recommended Comments

LurKau

Posted

I changed a few things that I think would benefit an update in the source code.

What Changed

  • Made the UI text configurable via format strings
    • Added FormatCountText(int count) so "Text Count" in config can be something like "{0}/100" or "Online: {0}"
  • Added permission-driven behavior
    • onlinecounter.noui → player won’t see the UI
    • onlinecounter.dontcountme → player won’t be included in the online count  
    • Introduced ShouldShowUI() / ShouldCountOnline() helpers to keep this logic clean.
  • Improved counting + UI refresh flow
    • Recounts on startup (`CountOnlinePlayers()`)
    • Adjusts `_onlineCount` on connect/disconnect with safety (Mathf.Max(0, ...))
    • Uses `NextTick(UpdateUIForAllPlayers)` on disconnect to avoid timing issues
    • Rebuilds the UI for all active players via UpdateUIForAllPlayers() / ShowUI()

OnlineCounter.cs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Like 1
  • Love 1

Miho's Collection

User Feedback

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.9k
Customers served
Files Sold
156.6k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.