set blip color in one function
This commit is contained in:
@@ -66,10 +66,12 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
jailTime /= 2;
|
||||
}
|
||||
|
||||
client.GetUser(dbContext).JailTime = jailTime;
|
||||
User clientUser = client.GetUser(dbContext);
|
||||
|
||||
clientUser.JailTime = jailTime;
|
||||
Jailtime[user.Id] = jailTime; // 54 sec for each wanted star -> in total 45min for 50 Wanteds
|
||||
|
||||
client.GetUser(dbContext).Wanteds = 0;
|
||||
clientUser.Wanteds = 0;
|
||||
client.SetData("isDead", false);
|
||||
client.RemoveAllWeapons();
|
||||
client.SetSharedData("blipColor", 0);
|
||||
@@ -100,29 +102,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
|
||||
client.TriggerEvent("jailTime", JsonConvert.SerializeObject(timeMinutes));
|
||||
|
||||
switch (user.FactionId)
|
||||
{
|
||||
case null:
|
||||
client.SetSharedData("blipColor", 0);
|
||||
client.SetSharedData("nameTagColor", 0);
|
||||
break;
|
||||
case 8:
|
||||
client.SetSharedData("blipColor", 83);
|
||||
client.SetSharedData("nameTagColor", 8);
|
||||
break;
|
||||
case 7:
|
||||
client.SetSharedData("blipColor", 52);
|
||||
client.SetSharedData("nameTagColor", 7);
|
||||
break;
|
||||
case 4:
|
||||
client.SetSharedData("blipColor", 5);
|
||||
client.SetSharedData("nameTagColor", 4);
|
||||
break;
|
||||
case 9:
|
||||
client.SetSharedData("blipColor", 25);
|
||||
client.SetSharedData("nameTagColor", 9);
|
||||
break;
|
||||
}
|
||||
clientUser.SetBlipAndNametagColor();
|
||||
|
||||
if (announceHq)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user