GELD LOGS

This commit is contained in:
hydrant
2021-05-15 03:14:37 +02:00
parent 3c2d56f2ad
commit a2db770316
22 changed files with 448 additions and 306 deletions

View File

@@ -2287,6 +2287,7 @@ namespace ReallifeGamemode.Server.Commands
{
var user = target.GetUser(context);
user.Handmoney = amount;
logger.LogInformation("Admin {0} set the handmoney of player {1} to {2} dollars", admin.Name, target.Name, amount);
context.SaveChanges();
//target.TriggerEvent("SERVER:SET_HANDMONEY", amount);
}
@@ -2313,6 +2314,7 @@ namespace ReallifeGamemode.Server.Commands
{
var user = target.GetUser(context);
user.Handmoney += amount;
logger.LogInformation("Admin {0} added {2} dollarsto the handmoney of player {1}", admin.Name, target.Name, amount);
context.SaveChanges();
//target.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney);
}
@@ -3356,6 +3358,7 @@ namespace ReallifeGamemode.Server.Commands
using (var dbContext = new DatabaseContext())
{
logger.LogInformation("Admin {0} set the bank account of {1} to {2} dollars", player.Name, target.Name, amount);
target.GetUser(dbContext).BankAccount.Balance = amount;
dbContext.SaveChanges();
}
@@ -3381,6 +3384,7 @@ namespace ReallifeGamemode.Server.Commands
using (var dbContext = new DatabaseContext())
{
logger.LogInformation("Admin {0} added {2} dollars to the bank account of {1}", player.Name, target.Name, amount);
target.GetUser(dbContext).BankAccount.Balance += amount;
dbContext.SaveChanges();
}