fix duty
This commit is contained in:
@@ -94,7 +94,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
{
|
{
|
||||||
//LSFD
|
//LSFD
|
||||||
case 2:
|
case 2:
|
||||||
player.TriggerEvent("showFactionInteraction", user.FactionId, player.GetData("duty"), user.Faction.Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
player.TriggerEvent("showFactionInteraction", user.FactionId, user.GetData<bool>("duty"), user.Faction.Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,9 +136,9 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
var nameTagColor = new Color(0, 0, 0);
|
var nameTagColor = new Color(0, 0, 0);
|
||||||
var factionId = user.FactionId;
|
var factionId = user.FactionId;
|
||||||
|
|
||||||
if (player.GetData("duty") == false)
|
if (user.GetData<bool>("duty") == false)
|
||||||
{
|
{
|
||||||
player.SetData("duty", true);
|
user.SetData("duty", true);
|
||||||
player.SendNotification("Du bist nun ~g~im Dienst.");
|
player.SendNotification("Du bist nun ~g~im Dienst.");
|
||||||
if (player.GetUser().FactionId == 2) //Fire Department
|
if (player.GetUser().FactionId == 2) //Fire Department
|
||||||
{
|
{
|
||||||
@@ -186,7 +186,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.SetData("duty", false);
|
user.SetData("duty", false);
|
||||||
player.SendNotification("Du bist nun ~r~außer Dienst.");
|
player.SendNotification("Du bist nun ~r~außer Dienst.");
|
||||||
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", false);
|
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", false);
|
||||||
player.NametagColor = new Color(255, 255, 255);
|
player.NametagColor = new Color(255, 255, 255);
|
||||||
|
|||||||
Reference in New Issue
Block a user