50 wanteds bugg
This commit is contained in:
@@ -222,12 +222,13 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
|
||||
internal static void GiveWanteds(this User user, Player cop, int amount, string reason)
|
||||
{
|
||||
if (user.Wanteds + amount > 50)
|
||||
int newWanteds = user.Wanteds + amount;
|
||||
if (newWanteds > 50)
|
||||
{
|
||||
ChatService.ErrorMessage(cop, "Die Wanteds dürfen ein Limit von 50 nicht überschreiten");
|
||||
return;
|
||||
newWanteds = 50;
|
||||
}
|
||||
int newWanteds = user.Wanteds + amount;
|
||||
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
User dbUser = dbContext.Users.Where(u => u.Id == user.Id).FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user