Änderung Busfahrer/Pilot Bugs fix siehe Forenbeitrag

This commit is contained in:
Mac_Slash
2020-05-04 03:04:44 +02:00
parent 4dd9afd355
commit 1937846fb2
16 changed files with 498 additions and 262 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using GTANetworkAPI;
using ReallifeGamemode.Server.Util;
@@ -171,13 +171,18 @@ namespace ReallifeGamemode.Server.Job
[RemoteEvent("startPilotRoute")]
public void StartPilotRoute(Player player, string type)
{
player.SendChatMessage("Debug Pilot 5");
Vehicle veh = player.Vehicle;
if (player.VehicleSeat == 0)
{
player.SendChatMessage("Debug Pilot 6");
if (type == "RouteStart")
{
player.SendChatMessage("Debug Pilot 7");
player.SendChatMessage($"Debug PilotenJob PilotenBaseAbfrage: {player.GetData<int>("PilotenBase")}");
if (player.HasData("PilotenBase") && player.GetData<int>("PilotenBase") == 1)
{
player.SendChatMessage("Debug Pilot 8");
Random rnd = new Random();
int rroute = rnd.Next(1, 4);
switch (rroute)
@@ -253,6 +258,14 @@ namespace ReallifeGamemode.Server.Job
{
CheckPointHandle.StartCheckPointRoute(player, Route6, 0, 6, 40, 20, true, "pilotJob");
}
else
{
player.SendChatMessage("Debug Pilot 9");
}
}
else
{
player.SendChatMessage("Debug Pilot 10");
}
}
public static void payWage(Player jobber, int wage)