Made some last changes to faction interaction
This commit is contained in:
@@ -31,7 +31,7 @@ mp.events.add("updateFactionBlips", (type, taskList) => {
|
||||
|
||||
});
|
||||
|
||||
mp.events.add("showFactionInteraction", (userFactionId, userFactionName, isFactionLeader, reviveTaskCount, healTaskCount, fireTaskCount) => {
|
||||
mp.events.add("showFactionInteraction", (userFactionId, isDuty, userFactionName, isFactionLeader, reviveTaskCount, healTaskCount, fireTaskCount) => {
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.Interaction = true;
|
||||
|
||||
@@ -49,8 +49,10 @@ mp.events.add("showFactionInteraction", (userFactionId, userFactionName, isFacti
|
||||
let reviveTaskMenu;
|
||||
let healTaskMenu;
|
||||
let fireTaskMenu;
|
||||
|
||||
switch (userFactionId) {
|
||||
if (isDuty)
|
||||
{
|
||||
switch (userFactionId)
|
||||
{
|
||||
case 2:
|
||||
reviveTaskMenu = new UIMenuItem("Reviveauftr\u00e4ge");
|
||||
reviveTaskMenu.SetRightLabel(rP + reviveTaskCount)
|
||||
@@ -65,6 +67,7 @@ mp.events.add("showFactionInteraction", (userFactionId, userFactionName, isFacti
|
||||
factionInteractionMenu.AddItem(fireTaskMenu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let cancelItem = new UIMenuItem("Schlie\u00dfen", "Schlie\u00dft die Fraktionsinteraktion");
|
||||
cancelItem.BackColor = new Color(213, 0, 0);
|
||||
@@ -241,6 +244,7 @@ mp.events.add('render', () => {
|
||||
outline: true,
|
||||
centre: true
|
||||
});
|
||||
if (taskRange < rangeLeft) ambulanceImagePos = 0.3;
|
||||
mp.game.graphics.drawSprite("medicimages", "finish", 0.655, 0.898, 0.04, 0.07, 0, 255, 255, 255, 255);
|
||||
if (player.isInAnyVehicle(false)) {
|
||||
mp.game.graphics.drawSprite("medicimages", "ambulance", ambulanceImagePos + 0.01, 0.915, 0.04, 0.07, 0, 255, 255, 255, 255);
|
||||
|
||||
@@ -34,11 +34,11 @@ mp.keys.bind(0x26, false, function () {
|
||||
});
|
||||
|
||||
//RIGHT ARROW (Interaktion mit anderen Spielern)
|
||||
//mp.keys.bind(0x27, false, function () {
|
||||
// if (!globalData.InChat && !showInv && !globalData.Interaction) {
|
||||
// mp.events.callRemote("keyPress:RIGHT_ARROW");
|
||||
// }
|
||||
//});
|
||||
mp.keys.bind(0x27, false, function () {
|
||||
if (!globalData.InChat && !showInv && !globalData.Interaction) {
|
||||
mp.events.callRemote("keyPress:RIGHT_ARROW");
|
||||
}
|
||||
});
|
||||
|
||||
//DOWN ARROW (Interaktion mit anderen Spielern)
|
||||
mp.keys.bind(0x28, false, function () {
|
||||
@@ -65,11 +65,11 @@ mp.keys.bind(0x62, false, function () {
|
||||
});
|
||||
|
||||
//NUM5 //Fraktionsinteraktion (Tasks sortieren)
|
||||
mp.keys.bind(0x65, false, function () {
|
||||
if (!globalData.InChat && globalData.Interaction) {
|
||||
mp.events.call("sortFactionTasks", true);
|
||||
}
|
||||
});
|
||||
//mp.keys.bind(0x65, false, function () {
|
||||
// if (!globalData.InChat && globalData.Interaction) {
|
||||
// mp.events.call("sortFactionTasks", true);
|
||||
// }
|
||||
//});
|
||||
|
||||
//E
|
||||
mp.keys.bind(0x45, false, function () {
|
||||
|
||||
@@ -267,6 +267,16 @@ namespace reallife_gamemode.Server.Commands
|
||||
[Command("duty", "~m~Benutzung: ~s~/duty")]
|
||||
public void CmdFactionDuty(Client player)
|
||||
{
|
||||
if(player.GetData("duty") == false)
|
||||
{
|
||||
player.SetData("duty", true);
|
||||
player.SendNotification("~g~Du bist jetzt im Dienst!", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SetData("duty", false);
|
||||
player.SendNotification("~r~Schönen Feierabend!", false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace reallife_gamemode.Server.Events
|
||||
{
|
||||
//LSFD
|
||||
case 2:
|
||||
player.TriggerEvent("showFactionInteraction", user.FactionId, user.GetFaction().Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
||||
player.TriggerEvent("showFactionInteraction", user.FactionId, player.GetData("duty"), user.GetFaction().Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user