Jump to content

Arcade Machine Connector 1.0.0

$10.00
   (1 review)

1 Screenshot

About Arcade Machine Connector

A plugin that connects all Arcade Machines together to have a global leaderboard. In addition, it gives the possibility to other developers to add more features!

 

Features:

  • Connects all Arcade Machines together to show a global leaderboard.
  • Permission to only allow player with the permission to appear in the leaderboard.

 

Permissions:

  • ArcadeMachineConnector.upload : Allow the player/group with the permission to appear in the leaderboard.

 

Hooks:

/*
This hook is triggered by OnEntityDismounted for performance purpose.
That means it can be triggered multiple times if the player plays many games before unmounting the arcade machine.
Only score > 0 and unique score will trigger (losing 2 times at the same level doesn't trigger 2 times). Had to do that because of how Rust Arcade Machine score are bugged (one game can appear multiple time in the leaderboard).
*/
private void OnNewScore(BasePlayer player, int score)
{
    Puts($"{player.displayName} has reached level {score}.");
}

// This hook is triggered by OnEntityDismounted for performance purpose.
// This hook trigger if the player has beated his previous registered highest score.
private void OnNewHighestScore(BasePlayer player, int score)
{
  Puts($"{player.displayName} has beated his highest score by reaching the level {score}!");
}

private void OnPlayerRemovedFromLeaderboard(ulong steamID)
{
    Puts($"'{steamID}' has been removed from the leaderboard.");
}

 

API:

private void PutsLeaderboard()
{
    var leaderboard = Manager.GetPlugin("ArcadeMachineConnector").Call<Dictionary<ulong, int>>("GetLeaderboard", Name);
    if (leaderboard == null)
    {
        Puts("pluginName is null or empty.");
        return;
    }

    foreach (var player in leaderboard)
    {
        Puts($"{player.Key}: {player.Value}");
    }
}

private void PutsHighestScore(BasePlayer player)
{
    var highestScore = Manager.GetPlugin("ArcadeMachineConnector").Call<int?>("GetHighestScore", Name, player.userID);

    if (highestScore == null)
    {
        Puts("pluginName null or empty, player?.userID is null or it isn't a player.");
    }
    else
    {
        Puts($"{player.displayName} highest score is {highestScore}.");
    }
}

private void RemovePlayerFromLeaderboard(BasePlayer player)
{
    var hasBeenRemoved = Manager.GetPlugin("ArcadeMachineConnector").Call<bool?>("RemoveFromLeaderboard", Name, player.userID);
    if (hasBeenRemoved == null)
    {
        Puts("pluginName null or empty, player?.userID is null or it isn't a player.");
    }
    else if (hasBeenRemoved == true)
    {
        Puts($"{player.displayName} has been removed from the leaderboard.");
    }
    else
    {
        Puts($"{player.displayName} has not been removed from the leaderboard. (missing from leaderboard?)");
    }
}

 

Optimized for Performance

This plugin has been developed with a primary objective to be very performant, thus limiting plugin-related performance losses.

Depending the plugin, a category called "Performance Settings" allow the administrator to reduce power consumption at the cost of the quality.

 

About Mælep

My other plugins: Codefling's profile

Looking for plugins: Fiverr's Gig

Contact website: Maelep.be

 

Warranty and Updates

The customers benefits from a 28-day warranty from the date of the last sell of the plugin. This warranty covers bugs related to the script and, as far as possible, bugs related to Rust and uMod updates.

 

Terms of Service of Mælep

The Mælep's plugins are in no way affiliated to Facepunch, uMod or Codefling. He should not be considered as a developer endorsed by Facepunch, uMod or Codefling.

Any contribution or purchase made on this website is donated to Mælep.

For more information, support or a purchase history, please use the support section available on the page of the plugin.

Payment to Mælep is payment for the digital items contained in the purchase. This transaction is final and there is no refund. If you are banned for breaking the rules of Codefling, you will not be refunded. Requests for refunds due to delays, Rust and uMod update flaws or any other problems are submitted at the discretion of Mælep.


User Feedback

1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.4k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • 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.