finish müllmann :*
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
@@ -43,11 +45,24 @@ namespace ReallifeGamemode.Server.Job
|
||||
_inJob.Remove(player);
|
||||
jobPlayer.Remove(player);
|
||||
|
||||
|
||||
|
||||
User user = player.GetUser();
|
||||
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
user = player.GetUser(dbContext);
|
||||
user.trashcount -= user.trashcount;
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
|
||||
if (quit)
|
||||
{
|
||||
ChatService.SendMessage(player, $"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ beendet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
JobStop?.Invoke(player);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user