Add duty System and Duty Cloth

This commit is contained in:
VegaZ
2018-11-14 19:00:31 +01:00
parent f02ad2b93d
commit b4df50215d
17 changed files with 371 additions and 45 deletions

View File

@@ -239,27 +239,7 @@ namespace reallife_gamemode.Server.Commands
[Command("duty", "~m~Benutzung: ~s~/duty")]
public void CmdFactionDuty(Client player)
{
if (player.GetUser()?.FactionId == null)
{
ChatService.NotAuthorized(player);
return;
}
if(player.GetData("duty") != true)
{
player.SetData("duty", true);
player.SendNotification("Du bist nun ~g~im Dienst.");
if(player.GetUser().FactionId == 2)
{
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", true);
}
}
else
{
player.SetData("duty", false);
player.SendNotification("Du bist nun ~r~außer Dienst.");
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", false);
}
}
#endregion
}