afk system

This commit is contained in:
hydrant
2021-04-13 20:32:20 +02:00
parent b981819b52
commit 62ac08e98d
7 changed files with 76 additions and 2 deletions

View File

@@ -136,6 +136,11 @@ namespace ReallifeGamemode.Server.Extensions
return player.GetServerData("duty", false);
}
public static bool IsAfk(this Player player)
{
return player.GetServerData("isAfk", false);
}
public static bool IsAlive(this Player player)
{
return !player.HasData("isDead") || player.GetData<bool>("isDead") == false;