inshallah kein fehler
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using System.Timers;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
class TaxiDriverJob : JobBase
|
||||
internal class TaxiDriverJob : JobBase
|
||||
{
|
||||
public List<TaxiContract> TaxiContracts { get; set; } = new List<TaxiContract>();
|
||||
|
||||
@@ -27,7 +24,6 @@ namespace ReallifeGamemode.Server.Job
|
||||
|
||||
public override bool NeedVehicleToStart => true;
|
||||
|
||||
|
||||
private static TaxiDriverJob _Instance;
|
||||
|
||||
public TaxiDriverJob()
|
||||
@@ -42,6 +38,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
_Instance = new TaxiDriverJob();
|
||||
return _Instance;
|
||||
}
|
||||
|
||||
private void TaxiDriverJobJobStart(Player player)
|
||||
{
|
||||
player.Vehicle.SetSharedData("vehicleTaxiLight", true);
|
||||
@@ -89,24 +86,23 @@ namespace ReallifeGamemode.Server.Job
|
||||
dbContext.SaveChanges();
|
||||
target.Player.TriggerEvent("SERVER:SET_HANDMONEY", target.Handmoney);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
public static void StartTaxiTimer()
|
||||
{
|
||||
Timer timer = new Timer(500);
|
||||
timer.Start();
|
||||
timer.Elapsed += UpdateFare;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
public static void StartTaxiTimer()
|
||||
{
|
||||
Timer timer = new Timer(500);
|
||||
timer.Start();
|
||||
timer.Elapsed += UpdateFare;
|
||||
}
|
||||
*/
|
||||
|
||||
public static void UpdateFare()
|
||||
{
|
||||
foreach (var player in GetPlayerInJob())
|
||||
{
|
||||
User u = player.GetUser();
|
||||
if (u.JobId != 1) return;
|
||||
if (u.JobId != 1) return;
|
||||
Console.WriteLine(player.Name);
|
||||
if (!player.HasData("hasPassager")) { player.SetData<bool>("hasPassager", false); continue; }
|
||||
int playerId = player.GetUser().Id;
|
||||
@@ -124,9 +120,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
occupant.TriggerEvent("CLIENT:updateFare", JsonConvert.SerializeObject(distance));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user