[HOTFIX] v0.0.3-h1
fix bug at LSED checkpoint fix Message for Cops
This commit is contained in:
@@ -35,9 +35,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
var reviveTaskMenuMedic;
|
var reviveTaskMenuMedic;
|
||||||
var insDate;
|
var insDate;
|
||||||
/*mp.events.add("updateFactionBlips", (type, taskList) => {
|
/*mp.events.add("updateFactionBlips", (type, taskList) => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});*/
|
});*/
|
||||||
mp.events.add("showFactionInteractionLSPD", (userFactionId, isDuty, userFactionName, isFactionLeader) => {
|
mp.events.add("showFactionInteractionLSPD", (userFactionId, isDuty, userFactionName, isFactionLeader) => {
|
||||||
//LSPD
|
//LSPD
|
||||||
@@ -64,8 +62,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
TaskMenuLSPD.SetRightLabel("");
|
TaskMenuLSPD.SetRightLabel("");
|
||||||
factionInteractionMenu.AddItem(TaskMenuLSPD);*/ //weiteres
|
factionInteractionMenu.AddItem(TaskMenuLSPD);*/ //weiteres
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let cancelItem = new UIMenuItem("Schlie\u00dfen", "Schlie\u00dft die Fraktionsinteraktion.");
|
let cancelItem = new UIMenuItem("Schlie\u00dfen", "Schlie\u00dft die Fraktionsinteraktion.");
|
||||||
cancelItem.BackColor = new Color(213, 0, 0);
|
cancelItem.BackColor = new Color(213, 0, 0);
|
||||||
cancelItem.HighlightedBackColor = new Color(229, 57, 53);
|
cancelItem.HighlightedBackColor = new Color(229, 57, 53);
|
||||||
@@ -172,7 +168,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
var wList;
|
var wList;
|
||||||
|
|
||||||
mp.events.add("showWantedlist", (playersJson) => {
|
mp.events.add("showWantedlist", (playersJson) => {
|
||||||
|
|
||||||
if (wantedlistBrowser !== null) {
|
if (wantedlistBrowser !== null) {
|
||||||
wantedlistBrowser.destroy();
|
wantedlistBrowser.destroy();
|
||||||
wantedlistBrowser = null;
|
wantedlistBrowser = null;
|
||||||
@@ -193,7 +188,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add("removeWantedlist", () => {
|
mp.events.add("removeWantedlist", () => {
|
||||||
|
|
||||||
if (wantedlistBrowser == null) {
|
if (wantedlistBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -212,7 +206,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
|
|
||||||
|
|
||||||
var rPM = ((reviveTaskCountMedic === "0") ? "~r~" : "~g~");
|
var rPM = ((reviveTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||||
var hPM = ((healTaskCountMedic === "0") ? "~r~" : "~g~");
|
var hPM = ((healTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||||
var fPM = ((fireTaskCountMedic === "0") ? "~r~" : "~g~");
|
var fPM = ((fireTaskCountMedic === "0") ? "~r~" : "~g~");
|
||||||
@@ -238,7 +231,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
fireTaskMenuMedic.SetRightLabel(fPM + fireTaskCountMedic);
|
fireTaskMenuMedic.SetRightLabel(fPM + fireTaskCountMedic);
|
||||||
factionInteractionMenu.AddItem(fireTaskMenuMedic);
|
factionInteractionMenu.AddItem(fireTaskMenuMedic);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,9 +269,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
mp.events.add("showMedicTasks", (type, taskList) => {
|
mp.events.add("showMedicTasks", (type, taskList) => {
|
||||||
|
|
||||||
tasks = JSON.parse(taskList);
|
tasks = JSON.parse(taskList);
|
||||||
|
|
||||||
//mp.events.call("sortFactionTasks", false);
|
//mp.events.call("sortFactionTasks", false);
|
||||||
@@ -469,7 +459,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
||||||
if (activeCheckpoint) {
|
if (activeCheckpoint && mp.checkpoints.exists(activeCheckpoint)) {
|
||||||
activeCheckpoint.destroy();
|
activeCheckpoint.destroy();
|
||||||
activeCheckpoint = null;
|
activeCheckpoint = null;
|
||||||
activeTask = null;
|
activeTask = null;
|
||||||
@@ -486,7 +476,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
activeTask = null;
|
activeTask = null;
|
||||||
deadRespawned = false;
|
deadRespawned = false;
|
||||||
timeLeft = null;
|
timeLeft = null;
|
||||||
} else if (activeTask.Type == 1){
|
} else if (activeTask.Type == 1) {
|
||||||
activeCheckpoint.destroy();
|
activeCheckpoint.destroy();
|
||||||
activeCheckpoint = null;
|
activeCheckpoint = null;
|
||||||
mp.events.callRemote("delHealTaskAsMedic", activeTask.Victim);
|
mp.events.callRemote("delHealTaskAsMedic", activeTask.Victim);
|
||||||
@@ -502,7 +492,6 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add('render', () => {
|
mp.events.add('render', () => {
|
||||||
|
|
||||||
if (activeTask) {
|
if (activeTask) {
|
||||||
rangeLeft = mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, taskFinish.x, taskFinish.y, taskFinish.z, true).toFixed(2);
|
rangeLeft = mp.game.gameplay.getDistanceBetweenCoords(player.position.x, player.position.y, player.position.z, taskFinish.x, taskFinish.y, taskFinish.z, true).toFixed(2);
|
||||||
if (rangeLeft > 1.9) {
|
if (rangeLeft > 1.9) {
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
|
|
||||||
bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 200 * 200);
|
bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 200 * 200);
|
||||||
|
|
||||||
|
if (user.Wanteds > 0)
|
||||||
|
{
|
||||||
if (copNearby)
|
if (copNearby)
|
||||||
{
|
{
|
||||||
user.SetJailTime(true);
|
user.SetJailTime(true);
|
||||||
@@ -86,6 +88,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
{
|
{
|
||||||
ChatService.HQMessage(user.Name + " wurde soeben ins Krankenhaus eingeliefert.");
|
ChatService.HQMessage(user.Name + " wurde soeben ins Krankenhaus eingeliefert.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (user.JailTime <= 0)
|
if (user.JailTime <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -272,10 +272,12 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
Player[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray();
|
Player[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray();
|
||||||
foreach (var o in owners)
|
foreach (var o in owners)
|
||||||
{
|
{
|
||||||
|
if (o != null)
|
||||||
o.TriggerEvent("CLIENT:loose");
|
o.TriggerEvent("CLIENT:loose");
|
||||||
}
|
}
|
||||||
foreach (var a in attackers)
|
foreach (var a in attackers)
|
||||||
{
|
{
|
||||||
|
if (a != null)
|
||||||
a.TriggerEvent("CLIENT:win");
|
a.TriggerEvent("CLIENT:win");
|
||||||
}
|
}
|
||||||
this.Owner = FactionName;
|
this.Owner = FactionName;
|
||||||
|
|||||||
Reference in New Issue
Block a user