Merge branch 'develop' into 'master'
[HOTFIX] DaBaby See merge request log-gtav/reallife-gamemode!33
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -224,8 +224,10 @@ refuseCollector();
|
||||
import PedCreator from './Ped/PedCreator';
|
||||
PedCreator();
|
||||
|
||||
/*
|
||||
import attachmentManager from './util/attachmentMngr';
|
||||
attachmentManager(game);
|
||||
*/
|
||||
|
||||
import relativeVector from './util/relativevector';
|
||||
relativeVector();
|
||||
|
||||
@@ -58,7 +58,7 @@ 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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<CheckPointListForPlayer> listHandle = new List<CheckPointListForPlayer>();
|
||||
|
||||
public static void DeleteCheckpoints(Player player)
|
||||
@@ -177,24 +177,24 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
if (user.GetData<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("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<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("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<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("Route") == "Skill1Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count());
|
||||
PilotJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("Route") == "Skill2Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count());
|
||||
PilotJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
}
|
||||
//PilotJob.payWage(user, 100);
|
||||
|
||||
Reference in New Issue
Block a user