fix some things

This commit is contained in:
Michael
2020-08-01 00:29:31 +02:00
parent 6f57c8c93b
commit 4ec055a341
5 changed files with 24 additions and 16 deletions

View File

@@ -11,6 +11,9 @@ using ReallifeGamemode.Server.Job;
using ReallifeGamemode.Server.Services;
using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Services;
using ReallifeGamemode.Server.Types;
namespace ReallifeGamemode.Server.Managers
{
@@ -223,7 +226,7 @@ namespace ReallifeGamemode.Server.Managers
{
if (!player.HasData("JobVehicleFrei") || player.GetData<bool>("JobVehicleFrei") == false)
{
player.SetData("DelayTime", 60000*5);
player.SetData("DelayTime", 60000 * 5);
veh.SetData("timerJobVehicleRespawn", true);
player.SetData("LastVehicle", veh);
player.SetData("LastSVehicle", sVeh);
@@ -231,7 +234,7 @@ namespace ReallifeGamemode.Server.Managers
{
playerTimersJobVehicleRespawn[player].Stop();
}
PlayerTimer playerTimer = new PlayerTimer(player, veh, 60000*5);
PlayerTimer playerTimer = new PlayerTimer(player, veh, 60000 * 5);
playerTimer.Elapsed += PlayerTimer_Elapsed;
playerTimersJobVehicleRespawn[player] = playerTimer;
//player.SendChatMessage("~y~[JOB] ~w~Du hast das Fahrzeug verlassen,");
@@ -333,7 +336,7 @@ namespace ReallifeGamemode.Server.Managers
{
player.Position = new Vector3(-628.598388671875, -2107.609130859375, 6.072586536407471);
player.Heading = (-171.50303649902344f);
}
if (player.GetUser().JobId == 2)//Müllmann
{
@@ -395,15 +398,15 @@ namespace ReallifeGamemode.Server.Managers
if (driver.HasData("Passager")) return;
driver.SetData<int>("Passager", player.GetUser().Id);
driver.SetData<bool>("hasPassager", true);
/* using (var dbContext = new DatabaseContext())
{
int amount = (int)Math.Round(km * taxiPrice);
User contractUser = player.GetUser(dbContext);
contractUser.Handmoney -= amount;
driver.GetUser(dbContext).Wage += amount;
dbContext.SaveChanges();
//contractUser.Player.TriggerEvent("SERVER:SET_HANDMONEY", contractUser.Handmoney);
} */
/* using (var dbContext = new DatabaseContext())
{
int amount = (int)Math.Round(km * taxiPrice);
User contractUser = player.GetUser(dbContext);
contractUser.Handmoney -= amount;
driver.GetUser(dbContext).Wage += amount;
dbContext.SaveChanges();
//contractUser.Player.TriggerEvent("SERVER:SET_HANDMONEY", contractUser.Handmoney);
} */
player.TriggerEvent("CLIENT:startCustomerFare", taxiPrice, km);
var taxiContracts = taxiJob.TaxiContracts.Where(t => t.Name == player.Name);