Fix Nametagcolor
This commit is contained in:
@@ -12,7 +12,7 @@ export default function customNametags() {
|
||||
|
||||
mp.events.addDataHandler("nameTagColor", (entity, value) => {
|
||||
if (entity.type === "player") {
|
||||
entity.setVariable('nametagColor', value)
|
||||
entity.setVariable('nametagColor',)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function customNametags() {
|
||||
mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y],
|
||||
{
|
||||
font: 4,
|
||||
color: player.data.nametagColor, //Grove //Ballas 171 0 207 //PD 0 95 190 //FIB 0 0 170 LSED 147 0 0 NR 0 166 133 Trucker 255 162 Support 0 255 255 Zivilist 255 255 255
|
||||
color: [player.data.nametagColor[0], player.data.nametagColor[1], player.data.nametagColor[2], 200], //Grove //Ballas 171 0 207 //PD 0 95 190 //FIB 0 0 170 LSED 147 0 0 NR 0 166 133 Trucker 255 162 Support 0 255 255 Zivilist 255 255 255
|
||||
scale: [0.4, 0.4],
|
||||
outline: true,
|
||||
centre: false
|
||||
|
||||
@@ -279,21 +279,21 @@ namespace ReallifeGamemode.Server.Events
|
||||
//LSPD
|
||||
case 1:
|
||||
//nameTagColor = new Color(28, 134, 238);
|
||||
player.SetSharedData("nameTagColor", new Color[28, 134, 238, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[] { 28, 134, 238});
|
||||
player.SetSharedData("blipColor", 38);
|
||||
break;
|
||||
|
||||
//Medic
|
||||
case 2:
|
||||
//nameTagColor = new Color(255, 0, 0);
|
||||
player.SetSharedData("nameTagColor", new Color[255, 0, 0, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[] { 255, 0, 0});
|
||||
player.SetSharedData("blipColor", 79);
|
||||
break;
|
||||
|
||||
//FBI
|
||||
case 3:
|
||||
//nameTagColor = new Color(173, 0, 118);
|
||||
player.SetSharedData("nameTagColor", new Color[173, 0, 118, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[] { 173, 0, 118});
|
||||
player.SetSharedData("blipColor", 72);
|
||||
player.SetAccessories(2, 2, 0);
|
||||
break;
|
||||
|
||||
@@ -108,12 +108,12 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
case 8:
|
||||
player.SetSharedData("blipColor", 83);
|
||||
player.SetSharedData("nameTagColor", new Color[171, 0, 207, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[]{171, 0, 207});
|
||||
break;
|
||||
|
||||
case 7:
|
||||
player.SetSharedData("blipColor", 52);
|
||||
player.SetSharedData("nameTagColor", new Color[0, 54, 0, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[] { 0, 54, 0});
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@@ -121,7 +121,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
break;
|
||||
case 9:
|
||||
player.SetSharedData("blipColor", 25);
|
||||
player.SetSharedData("nameTagColor", new Color[0, 166, 133, 255]);
|
||||
player.SetSharedData("nameTagColor", new int[] { 0, 166, 133});
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user