Start Medic System / FactionInteraction
This commit is contained in:
@@ -6,6 +6,7 @@ using GTANetworkAPI;
|
||||
using GTANetworkMethods;
|
||||
using reallife_gamemode.Model;
|
||||
using reallife_gamemode.Server.Extensions;
|
||||
using reallife_gamemode.Server.Factions.Medic;
|
||||
using reallife_gamemode.Server.Services;
|
||||
using reallife_gamemode.Server.Util;
|
||||
|
||||
@@ -76,6 +77,20 @@ namespace reallife_gamemode.Server.Events
|
||||
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
|
||||
}
|
||||
}
|
||||
//MEDIC AUFTRAG
|
||||
MedicTask reviveTask = new MedicTask()
|
||||
{
|
||||
Victim = player,
|
||||
Position = player.Position,
|
||||
CauseOfDeath = reason.ToString(),
|
||||
Caller = player,
|
||||
Description = "Gestorben",
|
||||
Time = DateTime.Now,
|
||||
Type = 0
|
||||
};
|
||||
Medic.AddTaskToList(reviveTask);
|
||||
|
||||
//TODO PICTURE NOTIFICATION + SOUND für Medics
|
||||
|
||||
using (var userDeath = new DatabaseContext())
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using reallife_gamemode.Model;
|
||||
using reallife_gamemode.Server.Classes;
|
||||
using reallife_gamemode.Server.Entities;
|
||||
using reallife_gamemode.Server.Extensions;
|
||||
using reallife_gamemode.Server.Factions.Medic;
|
||||
using reallife_gamemode.Server.Inventory;
|
||||
using reallife_gamemode.Server.Inventory.Interfaces;
|
||||
using reallife_gamemode.Server.Managers;
|
||||
@@ -60,12 +61,21 @@ namespace reallife_gamemode.Server.Events
|
||||
}
|
||||
player.TriggerEvent("showPlayerInteraction", JsonConvert.SerializeObject(nearbyPlayerList));
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendNotification("~r~Es ist niemand in deiner N\u00e4he!", false);
|
||||
}
|
||||
}
|
||||
|
||||
[RemoteEvent("keyPress:RIGHT_ARROW")]
|
||||
public void KeyPressRightArrow(Client player)
|
||||
{
|
||||
if (!player.IsLoggedIn()) return;
|
||||
User user = player.GetUser();
|
||||
switch (user.FactionId)
|
||||
{
|
||||
//LSFD
|
||||
case 2:
|
||||
player.TriggerEvent("showFactionInteraction", user.FactionId, user.GetFaction().Name, user.FactionLeader, Medic.ReviveTasks.Count, Medic.HealTasks.Count, Medic.FireTasks.Count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[RemoteEvent("keyPress:E")]
|
||||
public void KeyPressE(Client player)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user