no health anti cheat when healing

This commit is contained in:
hydrant
2021-04-11 02:36:44 +02:00
parent 4126e22514
commit 34726abc04
8 changed files with 24 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ namespace ReallifeGamemode.Server.Wanted
player.RemoveAllWeapons();
player.ClearAttachments();
player.ClearAnimation();
player.Health = 100;
player.SafeSetHealth(100);
player.Armor = 0;
Random rnd = new Random();
int rndInt = rnd.Next(1, 3);
@@ -159,7 +159,7 @@ namespace ReallifeGamemode.Server.Wanted
}
player.TriggerEvent("jailTime", timeMinutes);
player.Health = 100;
player.SafeSetHealth(100);
}
}
}
@@ -182,7 +182,7 @@ namespace ReallifeGamemode.Server.Wanted
player.GetUser(dbContext).JailTime = 0;
dbContext.SaveChanges();
}
player.Health = 100;
player.SafeSetHealth(100);
player.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
ChatService.HQMessage("Beamter " + cop.Name + " hat " + user.Name + " aus dem Knast entlassen.");
@@ -202,7 +202,7 @@ namespace ReallifeGamemode.Server.Wanted
user.JailTime = 0;
dbContext.SaveChanges();
target.Health = 100;
target.SafeSetHealth(100);
target.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
ChatService.HQMessage(" Admin " + admin.Name + " hat " + user.Name + " aus dem Knast entlassen.");