set blip color in one function

This commit is contained in:
hydrant
2021-04-05 16:26:12 +02:00
parent 072be07e98
commit f8237c84bb
7 changed files with 134 additions and 315 deletions

View File

@@ -293,27 +293,8 @@ namespace ReallifeGamemode.Server.Events
}
switch (factionId)
{
//LSPD
case 1:
//nameTagColor = new Color(28, 134, 238);
//player.TriggerEvent("setNameTag", JsonConvert.SerializeObject(new int[] { 28, 134, 238 }));
player.SetSharedData("nameTagColor", factionId);
player.SetSharedData("blipColor", 38);
break;
//Medic
case 2:
//nameTagColor = new Color(255, 0, 0);
//player.TriggerEvent("setNameTag", JsonConvert.SerializeObject(new int[] { 255, 0, 0 }));
player.SetSharedData("nameTagColor", factionId);
player.SetSharedData("blipColor", 6);
break;
//FBI
case 3:
//nameTagColor = new Color(173, 0, 118);
player.SetSharedData("nameTagColor", factionId);
player.SetSharedData("blipColor", 63);
player.SetAccessories(2, 2, 0);
break;
}
@@ -347,10 +328,9 @@ namespace ReallifeGamemode.Server.Events
player.SendNotification("Du bist nun ~r~außer Dienst.");
player.TriggerEvent("toggleDutyMode", false);
Medic.UpdateDutyMedics(-1);
player.SetSharedData("blipColor", 0);
player.SetSharedData("nameTagColor", 0);
UpdateCharacterCloth.LoadCharacterDefaults(player);
}
user.SetBlipAndNametagColor();
}
if (nearestWeapon != null) // Weapon Point