Peds für Müllmann,Pilot1,Pilot2,Busfahrer + Verdienstsystemänderung + Routen eingefügt + Range von Pilot verkleinert
This commit is contained in:
@@ -5,15 +5,22 @@ using System.Linq;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Job;
|
||||
|
||||
|
||||
namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
public class CheckPointHandle : Script
|
||||
{
|
||||
public int BusSkill1RouteVerdienst = 500;
|
||||
public int BusSkill2RouteVerdienst = 650;
|
||||
public int BusSkill3RouteVerdienst = 800;
|
||||
public int PilotSkill1RouteVerdienst = 550;
|
||||
public int PilotSkill2RouteVerdienst = 750;
|
||||
public static List<CheckPointListForPlayer> listHandle = new List<CheckPointListForPlayer>();
|
||||
|
||||
public static void DeleteCheckpoints(Player player)
|
||||
{
|
||||
player.SetData("HatRoute", false);
|
||||
player.ResetData("Route");
|
||||
RemovePlayerHandlerFromList(player);
|
||||
player.TriggerEvent("destroyCP");
|
||||
}
|
||||
@@ -26,8 +33,9 @@ namespace ReallifeGamemode.Server.Util
|
||||
playerHandle.DeleteCheckpoints();
|
||||
|
||||
listHandle.Add(playerHandle);
|
||||
|
||||
player.ResetData("Route");
|
||||
playerHandle.StartRoute();
|
||||
|
||||
player.SetData("HatRoute", true);
|
||||
/*if(player.GetUser().BusSkill >= 1000)
|
||||
{
|
||||
@@ -164,11 +172,68 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
if (user.GetUser().JobId == 3)
|
||||
{
|
||||
PilotJob.payWage(user, 100);
|
||||
if (temp.checkPointsDone == 2)
|
||||
{
|
||||
if (user.GetData<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("Route") == "Skill1Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count());
|
||||
BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("Route") == "Skill2Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count());
|
||||
BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
}
|
||||
if (temp.checkPointsDone > 2)
|
||||
{
|
||||
if (user.GetData<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("Route") == "Skill1Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill1RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("Route") == "Skill2Route3")
|
||||
{
|
||||
BusDriverJob.payWage(user, PilotSkill2RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
}
|
||||
//PilotJob.payWage(user, 100);
|
||||
}
|
||||
if (user.GetUser().JobId == 4)
|
||||
{
|
||||
BusDriverJob.payWage(user, 100);
|
||||
if (temp.checkPointsDone == 2)
|
||||
{
|
||||
if(user.GetData<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("Route") == "Skill1Route3" || user.GetData<string>("Route") == "Skill1Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill1RouteVerdienst / temp.list.Count());
|
||||
BusDriverJob.payWage(user, BusSkill1RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("Route") == "Skill2Route3" || user.GetData<string>("Route") == "Skill2Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill2RouteVerdienst / temp.list.Count());
|
||||
BusDriverJob.payWage(user, BusSkill2RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill3Route1" || user.GetData<string>("Route") == "Skill3Route2" || user.GetData<string>("Route") == "Skill3Route3" || user.GetData<string>("Route") == "Skill3Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill3RouteVerdienst / temp.list.Count());
|
||||
BusDriverJob.payWage(user, BusSkill3RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
}
|
||||
if (temp.checkPointsDone > 2)
|
||||
{
|
||||
if (user.GetData<string>("Route") == "Skill1Route1" || user.GetData<string>("Route") == "Skill1Route2" || user.GetData<string>("Route") == "Skill1Route3" || user.GetData<string>("Route") == "Skill1Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill1RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill2Route1" || user.GetData<string>("Route") == "Skill2Route2" || user.GetData<string>("Route") == "Skill2Route3" || user.GetData<string>("Route") == "Skill2Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill2RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
if (user.GetData<string>("Route") == "Skill3Route1" || user.GetData<string>("Route") == "Skill3Route2" || user.GetData<string>("Route") == "Skill3Route3" || user.GetData<string>("Route") == "Skill3Route4")
|
||||
{
|
||||
BusDriverJob.payWage(user, BusSkill3RouteVerdienst / temp.list.Count());
|
||||
}
|
||||
}
|
||||
//BusDriverJob.payWage(user, 100);
|
||||
if (!user.IsInVehicle || user.VehicleSeat != 0) return;
|
||||
Vehicle veh = user.Vehicle;
|
||||
if (!(veh.GetData<IndicatorData>("indicatorData") is IndicatorData data)) data = new IndicatorData();
|
||||
@@ -199,7 +264,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
public bool useVehicle;
|
||||
public string eventInCheckpoint = "";
|
||||
|
||||
int checkPointsDone = 0;
|
||||
public int checkPointsDone = 0;
|
||||
|
||||
public CheckPointListForPlayer(Player nPlayer, IEnumerable<Vector3> nList, int nDelay, int nMarkerID, int nMarkerSize, int nMarkerDist, bool nUseVehicle, string nEvent)
|
||||
{
|
||||
@@ -239,12 +304,12 @@ namespace ReallifeGamemode.Server.Util
|
||||
player.SetData("HatRoute", false);
|
||||
if (player.GetUser().JobId == 3)
|
||||
{
|
||||
PilotJob.payWage(player, 200);
|
||||
//PilotJob.payWage(player, 200);
|
||||
PilotJob.PilotLetzterCheckpoint(player);
|
||||
}
|
||||
if (player.GetUser().JobId == 4)
|
||||
{
|
||||
BusDriverJob.payWage(player, 200);
|
||||
//BusDriverJob.payWage(player, 200);
|
||||
//CheckPointHandle.BusCheckpoint(player);
|
||||
BusDriverJob.BusLetzterCheckpoint(player);
|
||||
if (!player.IsInVehicle || player.VehicleSeat != 0) return;
|
||||
|
||||
Reference in New Issue
Block a user