@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user