fix Wanted Blip color

This commit is contained in:
Lukas Moungos
2019-12-15 14:55:02 +01:00
parent dcabc6eaf5
commit afa3348854
2 changed files with 19 additions and 1 deletions

View File

@@ -88,7 +88,7 @@ namespace ReallifeGamemode.Server.Wanted
} }
client.TriggerEvent("jailTime", timeMinutes); client.TriggerEvent("jailTime", timeMinutes);
ChatService.SendMessage(client, "!{#FF614A}* Du bist nun im Gefängnis für " + jailTime + " Sekunden."); ChatService.SendMessage(client, "!{#FF614A}* Du bist nun im Gefängnis für " + timeMinutes + " Minute/n.");
ChatService.BroadcastFaction("!{#8181E9}HQ: " + user.Name + " wurde ins Gefängnis geliefert.", new List<int>() { 1, 3 }); ChatService.BroadcastFaction("!{#8181E9}HQ: " + user.Name + " wurde ins Gefängnis geliefert.", new List<int>() { 1, 3 });
switch (user.FactionId) switch (user.FactionId)
{ {

View File

@@ -70,6 +70,24 @@ namespace ReallifeGamemode.Server.Wanted
using (var dbContext = new DatabaseContext()) using (var dbContext = new DatabaseContext())
{ {
player.GetUser(dbContext).Wanteds -= 1; player.GetUser(dbContext).Wanteds -= 1;
if(player.GetUser(dbContext).Wanteds == 0)
{
switch (player.GetUser(dbContext).FactionId)
{
case null:
player.SetSharedData("blipColor", 0);
break;
case 8:
player.SetSharedData("blipColor", 83);
break;
case 7:
player.SetSharedData("blipColor", 52);
break;
case 4:
player.SetSharedData("blipColor", 5);
break;
}
}
dbContext.SaveChanges(); dbContext.SaveChanges();
} }