taxi da spawnen wo job start
This commit is contained in:
@@ -21,6 +21,8 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
{
|
{
|
||||||
private static List<JobBase> _jobs = new List<JobBase>();
|
private static List<JobBase> _jobs = new List<JobBase>();
|
||||||
|
|
||||||
|
private Dictionary<Player, Vector3> playerJobStartPosition = new Dictionary<Player, Vector3>();
|
||||||
|
|
||||||
public static void LoadJobs()
|
public static void LoadJobs()
|
||||||
{
|
{
|
||||||
IEnumerable<Type> jobTypes = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.IsSubclassOf(typeof(JobBase)) && !t.IsAbstract);
|
IEnumerable<Type> jobTypes = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.IsSubclassOf(typeof(JobBase)) && !t.IsAbstract);
|
||||||
@@ -194,6 +196,12 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(player.Vehicle != null)
|
||||||
|
{
|
||||||
|
player.SetData<Vehicle>("LastVehicle", player.Vehicle);
|
||||||
|
}
|
||||||
|
|
||||||
|
playerJobStartPosition[player] = player.Position;
|
||||||
job.StartJob(player);
|
job.StartJob(player);
|
||||||
}
|
}
|
||||||
[ServerEvent(Event.PlayerExitVehicle)]
|
[ServerEvent(Event.PlayerExitVehicle)]
|
||||||
@@ -353,9 +361,9 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
job.StopJob(player);
|
job.StopJob(player);
|
||||||
if (player.GetUser().JobId == 1)//Taxifahrer
|
if (player.GetUser().JobId == 1)//Taxifahrer
|
||||||
{
|
{
|
||||||
player.Position = new Vector3(-628.598388671875, -2107.609130859375, 6.072586536407471);
|
//player.Position = new Vector3(-628.598388671875, -2107.609130859375, 6.072586536407471);
|
||||||
player.Heading = (-171.50303649902344f);
|
//player.Heading = (-171.50303649902344f);
|
||||||
|
player.Position = playerJobStartPosition[player];
|
||||||
}
|
}
|
||||||
if (player.GetUser().JobId == 2)//Müllmann
|
if (player.GetUser().JobId == 2)//Müllmann
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user