Remove attachments and animations when binned by the coppers

This commit is contained in:
2021-04-10 23:34:00 +02:00
parent 89577d27df
commit b594cda373

View File

@@ -11,6 +11,7 @@ using ReallifeGamemode.Services;
using System.Diagnostics; using System.Diagnostics;
using Newtonsoft.Json; using Newtonsoft.Json;
using ReallifeGamemode.Server.Managers; using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Util;
namespace ReallifeGamemode.Server.Wanted namespace ReallifeGamemode.Server.Wanted
{ {
@@ -18,7 +19,6 @@ namespace ReallifeGamemode.Server.Wanted
{ {
private static Dictionary<int, int> Jailtime { get; set; } = new Dictionary<int, int>(); //time in seconds private static Dictionary<int, int> Jailtime { get; set; } = new Dictionary<int, int>(); //time in seconds
public static void Check_PutBehindBars(User user) public static void Check_PutBehindBars(User user)
{ {
user.SetBlipAndNametagColor(); user.SetBlipAndNametagColor();
@@ -27,6 +27,8 @@ namespace ReallifeGamemode.Server.Wanted
if (user.JailTime > 0) if (user.JailTime > 0)
{ {
player.RemoveAllWeapons(); player.RemoveAllWeapons();
player.ClearAttachments();
player.ClearAnimation();
player.Health = 100; player.Health = 100;
player.Armor = 0; player.Armor = 0;
Random rnd = new Random(); Random rnd = new Random();