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

@@ -70,6 +70,24 @@ namespace ReallifeGamemode.Server.Wanted
using (var dbContext = new DatabaseContext())
{
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();
}