Coder Social home page Coder Social logo

rankcache's Introduction

Whitehill RankCache

Whitehill RankCache is a library designed to make it easier to obtain up-to-date group ranking information across all of your in-game scripts.

Why use this over :GetRankInGroup/:GetRoleInGroup?

  • This library ensures that you get up-to-date rank information whilst keeping API requests to a minimum.
  • It provides full control over when rank data is refreshed.

โš ๏ธ Knowledge of Roblox scripting is required to use this library.


Installation methods

Method 1 (recommended): Roblox Model

  1. Take the Roblox Model
  2. Drag into your game via the Toolbox
  3. Parent the module to a place it can be accessed by both the client and server (ideally ReplicatedStorage)

Method 2: GitHub Releases

  1. Download the latest rbxm release from the GitHub releases
  2. Drag the downloaded file into studio
  3. Parent the module to a place it can be accessed by both the client and server (ideally ReplicatedStorage)

Method 3: Rojo

  1. Download the GitHub repository to your computer.
  2. Install Rojo and all associated Studio/VSC plugins.
  3. Use Rojo to sync the RankCache library into your Studio project. (Or build the library using rojo build -o RankCache.rbxm)

Basic Usage

local rankCache = require(game:GetService('ReplicatedStorage').RankCache)

-- Fetches Player1's rank for group 1234
local player1Rank = rankCache:GetPlayerRank(game.Players.Player1, 1234)

-- Fetches Player1's role for group 1234
local player1Role = rankCache:GetPlayerRole(game.Players.Player1, 1234)

-- Fetches Player2's rank for the configured default group
local player2Rank = rankCache:GetPlayerRank(game.Players.Player2)

-- Fetches Player2's role for the configured default group
local player2Role = rankCache:GetPlayerRole(game.Players.Player2)

More examples are available in the examples folder.

rankcache's People

Contributors

thecakechicken avatar

Stargazers

 avatar Noah avatar

Watchers

Alex Gale avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.