Fix remoteCall

This commit is contained in:
VegaZ
2021-02-08 19:34:33 +01:00
parent e440d9c5e9
commit 1f63ba5470
2 changed files with 6 additions and 6 deletions

View File

@@ -90,22 +90,22 @@ namespace ReallifeGamemode.Server.Factions.Medic
}
[RemoteEvent("updateMedicTask")]
public void UpdateMedicTasks(Player player, int type, int index, string victimName)
public void UpdateMedicTasks(Player player, int type, int index)
{
Player target = PlayerService.GetPlayerByNameOrId(victimName);
Player target = PlayerService.GetPlayerByNameOrId(ReviveTasks[index].Victim);
switch (type)
{
case 0:
ReviveTasks[index].MedicName = player.Name;
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Reviveauftrag von " + victimName + " angenommen.", new List<int>() { 2 });
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Reviveauftrag von " + ReviveTasks[index].Victim + " angenommen.", new List<int>() { 2 });
target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ eilt zur Rettung.");
break;
case 1:
HealTasks[index].MedicName = player.Name;
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Healauftrag von " + victimName + " angenommen.", new List<int>() { 2 });
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Healauftrag von " + ReviveTasks[index].Victim + " angenommen.", new List<int>() { 2 });
target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ hat deinen Auftrag angenommen.");
break;