From b267c820ea931b01a73bb5df63e3ff26c22e46ac Mon Sep 17 00:00:00 2001 From: "michael.reiswich" Date: Tue, 30 Mar 2021 22:42:39 +0200 Subject: [PATCH] try something --- ReallifeGamemode.Client/Login/main.ts | 9 +++++++++ ReallifeGamemode.Client/util/Gangwar.ts | 6 +++--- ReallifeGamemode.Server/Events/Login.cs | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index 5c03c481..a339bb73 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -66,4 +66,13 @@ export default function (globalData: IGlobalData): void { loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); }); + + mp.events.add('SetNametagColor',(faction: string) => { + + mp.nametags.set({ + color: [73, 137, 0, 255], + }); + + + }); } \ No newline at end of file diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index 8178996a..08ed7303 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -261,9 +261,9 @@ self.attacker = null; //self.blip.setFlashes(false); mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false); - - //self.setColor(self.owner) - //self.blip.setColour(self.color) + self.blip.destroy(); + self.setColor(self.owner); + self.blip.setColour(self.color); mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color); self.setLeaderColShape(); return; diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 7f4951a5..530e083e 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -63,6 +63,7 @@ namespace ReallifeGamemode.Server.Events player.SetData("duty", false); player.SetData("Adminduty", false); player.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney, 0); + player.TriggerEvent("SetNametagColor"); Gangwar.Gangwar.loadPlayer(player); if (user.FactionLeader) {