formatted code
This commit is contained in:
@@ -44,7 +44,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
//player.TriggerEvent("medicInfo", dutyMedics);
|
||||
|
||||
//TODO: Zum Full Release entfernen
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString());
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString());
|
||||
|
||||
int? killerId;
|
||||
float killerPosX;
|
||||
@@ -67,7 +67,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
killerPosY = killer.Position.Y;
|
||||
killerPosZ = killer.Position.Z;
|
||||
killerHeading = killer.Heading;
|
||||
if(player != killer)
|
||||
if (player != killer)
|
||||
{
|
||||
string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + NAPI.Player.GetPlayerCurrentWeapon(killer) + ")";
|
||||
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
|
||||
@@ -91,16 +91,27 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
using (var userDeath = new DatabaseContext())
|
||||
{
|
||||
var dead = new Entities.Logs.Death { VictimId = player.GetUser().Id, KillerId = killerId, KillerPositionX = killerPosX, KillerPositionY = killerPosY,
|
||||
KillerPositionZ = killerPosZ, KillerHeading = killerHeading, VictimPositionX = player.Position.X, VictimPositionY = player.Position.Y,
|
||||
VictimPositionZ = player.Position.Z, VictimHeading = player.Heading, CauseOfDeath = reason.ToString()};
|
||||
var dead = new Entities.Logs.Death
|
||||
{
|
||||
VictimId = player.GetUser().Id,
|
||||
KillerId = killerId,
|
||||
KillerPositionX = killerPosX,
|
||||
KillerPositionY = killerPosY,
|
||||
KillerPositionZ = killerPosZ,
|
||||
KillerHeading = killerHeading,
|
||||
VictimPositionX = player.Position.X,
|
||||
VictimPositionY = player.Position.Y,
|
||||
VictimPositionZ = player.Position.Z,
|
||||
VictimHeading = player.Heading,
|
||||
CauseOfDeath = reason.ToString()
|
||||
};
|
||||
userDeath.DeathLogs.Add(dead);
|
||||
userDeath.SaveChanges();
|
||||
}
|
||||
}
|
||||
[RemoteEvent("RespawnPlayerAtHospital")]
|
||||
public void RespawnPlayerAtHospital(Client player)
|
||||
{
|
||||
{
|
||||
player.SetData("isDead", false);
|
||||
player.RemoveAllWeapons();
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5));
|
||||
|
||||
Reference in New Issue
Block a user