Maybe finished taxi job
This commit is contained in:
@@ -13,8 +13,8 @@ namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
public abstract class JobBase
|
||||
{
|
||||
public delegate void JobStartHandler();
|
||||
public delegate void JobStopHandler();
|
||||
public delegate void JobStartHandler(Client player);
|
||||
public delegate void JobStopHandler(Client player);
|
||||
|
||||
public event JobStartHandler JobStart;
|
||||
public event JobStopHandler JobStop;
|
||||
@@ -33,7 +33,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
|
||||
player.SendChatMessage($"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ gestartet.");
|
||||
|
||||
JobStart?.Invoke();
|
||||
JobStart?.Invoke(player);
|
||||
}
|
||||
|
||||
public void StopJob(Client player)
|
||||
@@ -42,7 +42,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
|
||||
player.SendChatMessage($"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ beendet.");
|
||||
|
||||
JobStop?.Invoke();
|
||||
JobStop?.Invoke(player);
|
||||
}
|
||||
|
||||
public List<JobVehicle> GetJobVehicles()
|
||||
|
||||
@@ -2,15 +2,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
class TaxiDriverJob : JobBase
|
||||
{
|
||||
public List<TaxiContract> TaxiContracts { get; set; } = new List<TaxiContract>();
|
||||
|
||||
public override int Id => 1;
|
||||
|
||||
public override string Name => "Taxifahrer";
|
||||
|
||||
public override bool NeedVehicleToStart => true;
|
||||
|
||||
public TaxiDriverJob()
|
||||
{
|
||||
JobStart += TaxiDriverJobJobStart;
|
||||
JobStop += TaxiDriverJobJobStop;
|
||||
}
|
||||
|
||||
private void TaxiDriverJobJobStart(Client player)
|
||||
{
|
||||
player.Vehicle.SetSharedData("vehicleTaxiLight", true);
|
||||
}
|
||||
|
||||
private void TaxiDriverJobJobStop(Client player)
|
||||
{
|
||||
player.Vehicle.SetSharedData("vehicleTaxiLight", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user