diff --git a/ReallifeGamemode.Client/Gui/nametags.ts b/ReallifeGamemode.Client/Gui/nametags.ts index af6351aa..df6fc96d 100644 --- a/ReallifeGamemode.Client/Gui/nametags.ts +++ b/ReallifeGamemode.Client/Gui/nametags.ts @@ -4,10 +4,24 @@ const height = 0.0065; const border = 0.001; const color = [73, 137, 0, 255]; var faction; +var playerColors = []; export default function customNametags() { mp.nametags.enabled = false; + /* + mp.events.addDataHandler("nameTagColor", (entity, value) => { + if (entity.type === "player") { + var color = JSON.parse(value); + entity.setVariable('nametagColor',color) + //mp.gui.chat.push(color); + } + }); + + mp.events.add('setNameTag', (value) => { + var color = JSON.parse(value); + mp.gui.chat.push(color); + });*/ mp.events.add('render', (nametags) => { const graphics = mp.game.graphics; @@ -26,11 +40,11 @@ export default function customNametags() { var armour = player.getArmour() / 100; y -= scale * (0.005 * (screenRes.y / 1080)); - mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y], { font: 4, - color: [255, 255, 255, 255], //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 + color: [255, 255, 255, 255], scale: [0.4, 0.4], outline: true, centre: false diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 848bcd2f..3dfc7746 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -224,8 +224,10 @@ refuseCollector(); import PedCreator from './Ped/PedCreator'; PedCreator(); +/* import attachmentManager from './util/attachmentMngr'; attachmentManager(game); +*/ import relativeVector from './util/relativevector'; relativeVector(); diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs index 31cefee7..47d9aca4 100644 --- a/ReallifeGamemode.Server/Bank/bank.cs +++ b/ReallifeGamemode.Server/Bank/bank.cs @@ -57,8 +57,8 @@ namespace ReallifeGamemode.Server.Bank } private static void EntityEnterFactionBankColShape(ColShape colShape, Player client) - { - if (client.IsInVehicle || !client.IsLoggedIn()) return; + { + if (client.IsInVehicle || !client.IsLoggedIn() || client.GetUser().FactionId is null) return; if (client.GetUser().FactionLeader == true) { diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 474d6d44..47008c2e 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -278,19 +278,24 @@ namespace ReallifeGamemode.Server.Events { //LSPD case 1: - nameTagColor = new Color(28, 134, 238); + //nameTagColor = new Color(28, 134, 238); + //player.TriggerEvent("setNameTag", JsonConvert.SerializeObject(new int[] { 28, 134, 238 })); + //player.SetSharedData("nameTagColor", JsonConvert.SerializeObject(new int[] { 28, 134, 238})); player.SetSharedData("blipColor", 38); break; //Medic case 2: - nameTagColor = new Color(255, 0, 0); + //nameTagColor = new Color(255, 0, 0); + //player.TriggerEvent("setNameTag", JsonConvert.SerializeObject(new int[] { 255, 0, 0 })); + //player.SetSharedData("nameTagColor", new int[] { 255, 0, 0}); player.SetSharedData("blipColor", 79); break; //FBI case 3: - nameTagColor = new Color(173, 0, 118); + //nameTagColor = new Color(173, 0, 118); + //player.SetSharedData("nameTagColor", new int[] { 173, 0, 118}); player.SetSharedData("blipColor", 72); player.SetAccessories(2, 2, 0); break; @@ -326,6 +331,7 @@ namespace ReallifeGamemode.Server.Events player.TriggerEvent("toggleDutyMode", false); Medic.UpdateDutyMedics(-1); player.SetSharedData("blipColor", 0); + //player.SetSharedData("nameTagColor", new Color[255, 255, 255, 255]); UpdateCharacterCloth.LoadCharacterDefaults(player); } } diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 9db87c76..4667db80 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -104,14 +104,22 @@ namespace ReallifeGamemode.Server.Events { case null: player.SetSharedData("blipColor", 0); + //player.SetSharedData("nameTagColor", new int[] { 255, 255, 255 }); + break; + + case 0: + player.SetSharedData("blipColor", 0); + //player.SetSharedData("nameTagColor", new int[] { 255, 255, 255 }); break; case 8: player.SetSharedData("blipColor", 83); + //player.SetSharedData("nameTagColor", new int[]{171, 0, 207}); break; case 7: player.SetSharedData("blipColor", 52); + //player.SetSharedData("nameTagColor", new int[] { 0, 54, 0}); break; case 4: @@ -119,6 +127,7 @@ namespace ReallifeGamemode.Server.Events break; case 9: player.SetSharedData("blipColor", 25); + //player.SetSharedData("nameTagColor", new int[] { 0, 166, 133}); break; } diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index 5db81d0e..4ab8214d 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Linq; using GTANetworkAPI; using Microsoft.EntityFrameworkCore; -using Newtonsoft.Json; using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Extensions; diff --git a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs index 80d0e5fa..7a2aab4a 100644 --- a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs +++ b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs @@ -296,13 +296,13 @@ namespace ReallifeGamemode.Server.Job if (target != null) { - user1.Wage += 10; - user2.Wage += 10; + user1.Wage += 25; + user2.Wage += 25; } else { - user1.Wage += 20; + user1.Wage += 50; } dbContext.SaveChanges(); } @@ -331,12 +331,12 @@ namespace ReallifeGamemode.Server.Job if (target != null) { - user1.Wage += 100; - user2.Wage += 100; + user1.Wage += 250; + user2.Wage += 250; } else { - user1.Wage += 200; + user1.Wage += 500; } user1.trashcount -= user1.trashcount; diff --git a/ReallifeGamemode.Server/Util/CheckPointHandle.cs b/ReallifeGamemode.Server/Util/CheckPointHandle.cs index 1826cb92..1d8aa46f 100644 --- a/ReallifeGamemode.Server/Util/CheckPointHandle.cs +++ b/ReallifeGamemode.Server/Util/CheckPointHandle.cs @@ -9,11 +9,11 @@ namespace ReallifeGamemode.Server.Util { public class CheckPointHandle : Script { - public int BusSkill1RouteVerdienst = 500; - public int BusSkill2RouteVerdienst = 650; - public int BusSkill3RouteVerdienst = 800; - public int PilotSkill1RouteVerdienst = 550; - public int PilotSkill2RouteVerdienst = 750; + public int BusSkill1RouteVerdienst = 1000; + public int BusSkill2RouteVerdienst = 1300; + public int BusSkill3RouteVerdienst = 1600; + public int PilotSkill1RouteVerdienst = 1100; + public int PilotSkill2RouteVerdienst = 1500; public static List listHandle = new List(); public static void DeleteCheckpoints(Player player) @@ -177,24 +177,24 @@ namespace ReallifeGamemode.Server.Util { if (user.GetData("Route") == "Skill1Route1" || user.GetData("Route") == "Skill1Route2" || user.GetData("Route") == "Skill1Route3") { - BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); - BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); } if (user.GetData("Route") == "Skill2Route1" || user.GetData("Route") == "Skill2Route2" || user.GetData("Route") == "Skill2Route3") { - BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); - BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); } } if (temp.checkPointsDone > 2) { if (user.GetData("Route") == "Skill1Route1" || user.GetData("Route") == "Skill1Route2" || user.GetData("Route") == "Skill1Route3") { - BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count()); } if (user.GetData("Route") == "Skill2Route1" || user.GetData("Route") == "Skill2Route2" || user.GetData("Route") == "Skill2Route3") { - BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); + PilotJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count()); } } //PilotJob.payWage(user, 100);