Skip to content
Prev Previous commit
Next Next commit
Feat: !econ check can now also check offline players
I dont exactly know why that limitation of online only was in place. set, take, give, check should work for offlines too.

Since the others are not important enough (for me at least) I am not doing that with this commit.
  • Loading branch information
LordTylus committed Dec 30, 2023
commit 59e6ad21812a0138c3e94daf2f2f1774ca94af6c
6 changes: 3 additions & 3 deletions Essentials/Commands/EcoModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ public void EcoTop() {
[Command("check", "Check the balance of a specific player")]
[Permission(MyPromoteLevel.None)]
public void EcoCheck(string Player) {
var p = Utilities.GetPlayerByNameOrId(Player);
var p = Utilities.GetIdentityByNameOrIds(Player);
if (p == null) {
Context.Respond("Player is not online or cannot be found!");
Context.Respond("Player cannot be found!");
return;
}
long balance = MyBankingSystem.GetBalance(p.Identity.IdentityId);
long balance = MyBankingSystem.GetBalance(p.IdentityId);
Context.Respond($"{p.DisplayName}'s balance is {balance:#,##0} credits");
}

Expand Down