Add Taximeter
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user