Extend Death System; Add Revive-System

This commit is contained in:
VegaZ
2018-10-21 21:31:31 +02:00
parent 614ec855e9
commit a1feadfd5d
6 changed files with 54 additions and 16 deletions

View File

@@ -47,6 +47,21 @@ namespace reallife_gamemode.Server.Events
return;
}
using (var loginUser = new DatabaseContext())
{
var user = loginUser.Users.SingleOrDefault(b => b.Name == player.Name);
if(user.Dead == true)
{
player.TriggerEvent("startDeathTimer");
player.SetData("isDead", true);
}
else
{
player.SetData("isDead", false);
}
}
player.SetData("isLoggedIn", false);
player.Position = new Vector3(-1883.736, -781.4911, -10);
player.FreezePosition = true;