BusJob change -> Get rest of the money on last checkpoint.
This commit is contained in:
@@ -33,9 +33,9 @@ namespace ReallifeGamemode.Server.Job
|
||||
public const uint VEHICLE_INTERMEDIATE = (uint)VehicleHash.Coach;
|
||||
public const uint VEHICLE_PROFESSIONAL = (uint)VehicleHash.Tourbus;
|
||||
|
||||
public const int WAGE_BEGINNER = 800;
|
||||
public const int WAGE_INTERMEDIATE = 1200;
|
||||
public const int WAGE_PROFESSIOAL = 1800;
|
||||
public const int WAGE_BEGINNER = 400;
|
||||
public const int WAGE_INTERMEDIATE = 600;
|
||||
public const int WAGE_PROFESSIOAL = 800;
|
||||
|
||||
public const string BEGINNER = "Anfänger";
|
||||
public const string INTERMEDIATE = "Fortgeschrittener";
|
||||
@@ -443,6 +443,14 @@ namespace ReallifeGamemode.Server.Job
|
||||
player.SendChatMessage("~y~[JOB]: ~w~Die neue Route lädt. Bitte warten...");
|
||||
string type = getPlayerRouteType(player);
|
||||
|
||||
if (type == BEGINNER)
|
||||
BusJobEvents.payWage(player, WAGE_BEGINNER);
|
||||
else if (type == INTERMEDIATE)
|
||||
BusJobEvents.payWage(player, WAGE_INTERMEDIATE);
|
||||
else if (type == PROFESSIONAL)
|
||||
BusJobEvents.payWage(player, WAGE_PROFESSIOAL);
|
||||
|
||||
|
||||
NAPI.Task.Run(() =>
|
||||
{
|
||||
if (type == BEGINNER)
|
||||
@@ -466,6 +474,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("SERVER:setIndicatorStatus", veh.Handle.Value, data.Left, data.Right);
|
||||
}
|
||||
|
||||
|
||||
public void BusCheckpoint(Player player)
|
||||
{
|
||||
if (!player.IsInVehicle || player.VehicleSeat != 0) return;
|
||||
@@ -624,7 +633,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
payWage(player, BusDriverJob.WAGE_PROFESSIOAL / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
||||
}
|
||||
|
||||
private void payWage(Player player, int wage)
|
||||
public static void payWage(Player player, int wage)
|
||||
{
|
||||
using var dbContext = new DatabaseContext();
|
||||
User user = player.GetUser(dbContext);
|
||||
|
||||
Reference in New Issue
Block a user