müllsack meldung wenn 20 erreicht

This commit is contained in:
2020-08-05 20:48:12 +02:00
parent b4c8cae1b6
commit 1a9eafffe7

View File

@@ -237,11 +237,22 @@ namespace ReallifeGamemode.Server.Job
user1 = player.GetUser(dbContext);
user2 = target.GetUser(dbContext);
user1.trashcount += 1;
if (user1.trashcount == 20)
{
player.SendChatMessage("~y~Dies ist dein 20ter Müllsack.");
}
player.SendNotification("Müllsack: " + user1.trashcount + " von 20.");
if (target != null)
{
target.SendNotification("Müllsack: " + user2.trashcount + " von 20.");
user2.trashcount += 1;
if (user1.trashcount == 20)
{
target.SendChatMessage("~y~Dies ist dein 20ter Müllsack.");
}
}
dbContext.SaveChanges();
}