Extend death-system
This commit is contained in:
@@ -206,7 +206,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
#endregion
|
||||
#region Sanitäter Commands
|
||||
|
||||
[Command("revive", "~m~Benutzung: ~s~/invite")]
|
||||
[Command("revive", "~m~Benutzung: ~s~/revive")]
|
||||
public void CmdFactionMedicRevive(Client player)
|
||||
{
|
||||
if (player.GetUser()?.FactionId == null || player.GetUser().FactionId != 2)
|
||||
@@ -225,5 +225,32 @@ namespace reallife_gamemode.Server.Commands
|
||||
deadPlayer.Health = 50;
|
||||
}
|
||||
#endregion
|
||||
#region Global Fraktions Commands
|
||||
[Command("duty", "~m~Benutzung: ~s~/invite")]
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user