add service ruf sanitäter

This commit is contained in:
Michael
2020-09-22 14:11:51 +02:00
parent 0639b3d517
commit 1be8590b36
8 changed files with 134 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ using Microsoft.EntityFrameworkCore;
using ReallifeGamemode.Server.Events;
using System;
using ReallifeGamemode.Server.Core.API;
using ReallifeGamemode.Server.Factions.Medic;
/**
* @overview Life of German Reallife - Managers Interaction (InteractionManager.cs)
@@ -689,10 +690,35 @@ namespace ReallifeGamemode.Server.Managers
}
}
[RemoteEvent("CLIENT:InteractionMenu_CallService_Sani")]
public void CallServiceSani(Player player)
{
//MEDIC AUFTRAG
MedicTask healTask = new MedicTask()
{
Victim = player.Name,
Position = player.Position,
Caller = null,
Description = "Healen",
Time = DateTime.Now,
Type = MedicTaskType.HEAL,
MedicName = "none"
};
if (player.GetData<bool>("healauftrag") == true)
{
player.SendNotification("~r~[Fehler] ~w~Du hast bereits ein Sanitäter gerufen.");
}else
{
Medic.AddTaskToList(healTask);
player.SetData("healauftrag", true);
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat soeben einen Serviceauftrag beantragt.", new List<int>() { 2 });
}
}
#endregion Eigeninteraktionen PFEILTASTE-RUNTER
#region Spielerinteraktionen PFEILTASTE-LINKS
#region Spielerinteraktionen PFEILTASTE-LINKS
[RemoteEvent("openTradeInventory")]
public void OpenTradeInventory(Player player, string targetPlayer)