Fix remoteCall
This commit is contained in:
@@ -319,7 +319,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
} else {
|
||||
if (tasks[index].MedicName === "none") {
|
||||
mp.game.graphics.requestStreamedTextureDict("medicimages", true);
|
||||
mp.events.callRemote("updateMedicTask", 0, index, tasks[index].Victim);
|
||||
mp.events.callRemote("updateMedicTask", 0, index);
|
||||
mp.game.ui.setNewWaypoint(tasks[index].Position.x, tasks[index].Position.y);
|
||||
activeCheckpoint = mp.checkpoints.new(1, new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 2), 3.0,
|
||||
{
|
||||
@@ -373,7 +373,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
||||
} else {
|
||||
if (tasks[index].MedicName === "none") {
|
||||
mp.game.graphics.requestStreamedTextureDict("medicimages", true);
|
||||
mp.events.callRemote("updateMedicTask", 1, index, player.name);
|
||||
mp.events.callRemote("updateMedicTask", 1, index);
|
||||
mp.game.ui.setNewWaypoint(tasks[index].Position.x, tasks[index].Position.y);
|
||||
activeCheckpoint = mp.checkpoints.new(1, new mp.Vector3(tasks[index].Position.x, tasks[index].Position.y, tasks[index].Position.z - 2), 3.0,
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user