Add Taximeter

This commit is contained in:
Siga
2020-03-01 17:39:54 +01:00
parent edf06f4478
commit fb527f8c57
21 changed files with 404 additions and 56 deletions

View File

@@ -16,6 +16,7 @@ namespace ReallifeGamemode.Server.Job
public event JobStopHandler JobStop;
private readonly List<Player> _inJob = new List<Player>();
private static readonly List<Player> jobPlayer = new List<Player>();
public abstract int Id { get; }
@@ -27,6 +28,7 @@ namespace ReallifeGamemode.Server.Job
{
if (_inJob.Contains(player)) return;
_inJob.Add(player);
jobPlayer.Add(player);
ChatService.SendMessage(player, $"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ gestartet.");
@@ -37,6 +39,7 @@ namespace ReallifeGamemode.Server.Job
{
if (!_inJob.Contains(player)) return;
_inJob.Remove(player);
jobPlayer.Remove(player);
if (quit)
{
@@ -54,6 +57,7 @@ namespace ReallifeGamemode.Server.Job
}
}
public static List<Player> GetPlayerInJob() => jobPlayer;
public List<Player> GetUsersInJob() => _inJob;
}
}