ist das denn die möglichkeit?
This commit is contained in:
@@ -11,6 +11,7 @@ using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Wanted;
|
||||
|
||||
/**
|
||||
@@ -201,7 +202,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
player.SetData("isDead", false);
|
||||
player.RemoveAllWeapons();
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5),-98.36f);
|
||||
NAPI.Player.SpawnPlayer(player, new Vector3(-495.45, -336.33, 34.5), -98.36f);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
List<Vector3> dealPoint = new List<Vector3>();
|
||||
dealPoint.Add(vehicle.GetData<Vector3>("weaponDealPoint"));
|
||||
CheckPointHandle.StartCheckPointRoute(client, dealPoint, 5000, 1, 7, "loadWeaponTransport");
|
||||
CheckPointHandle.StartCheckPointRoute(client, dealPoint, 5000, 1, 7, 3, true, "loadWeaponTransport");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,9 +183,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (!player.IsLoggedIn()) return;
|
||||
var user = player.GetUser();
|
||||
|
||||
|
||||
if (user?.FactionId != null)
|
||||
{
|
||||
DutyPoint nearestDuty = PositionManager.DutyPoints.Find(d => d.Position.DistanceTo(player.Position) <= 1.5 && d.FactionId == user.FactionId);
|
||||
WeaponPoint nearestWeapon = PositionManager.WeaponPoints.Find(w => w.Position.DistanceTo(player.Position) <= 1.5 && w.FactionId == user.FactionId);
|
||||
JailReleasePoint nearestJailReleasePoint = PositionManager.JailReleasePoints.Find(j => j.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3) && user.GetData<bool>("duty"));
|
||||
@@ -193,7 +190,10 @@ namespace ReallifeGamemode.Server.Events
|
||||
ClotheshopPoint nearestClotheShopPoint = PositionManager.clotheshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5 && (!user.GetData<bool>("duty")));
|
||||
ItemshopPoint nearestItemShopPoint = PositionManager.itemshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5);
|
||||
BehindVehiclePoint nearestBehindVehiclePoint = MarkerBehinVehicle.behindVehiclePoints.Find(s => s.marker.Position.DistanceTo(player.Position) <= 3 && (user.FactionId == 8 || user.FactionId == 7 || user.FactionId == 1 || user.FactionId == 3));
|
||||
JobPoint nearestJobPoint = PositionManager.JobPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.6);
|
||||
|
||||
if (user?.FactionId != null)
|
||||
{
|
||||
if (nearestBehindVehiclePoint != null)
|
||||
{
|
||||
if (player.HasAttachment("ammobox")) return;
|
||||
@@ -453,6 +453,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
player.TriggerEvent("CLIENT:StartGangwar");
|
||||
}
|
||||
|
||||
if (nearestJobPoint != null)
|
||||
{
|
||||
if (player.Vehicle != null) return;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Register (Register.cs)
|
||||
|
||||
@@ -7,6 +7,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
@@ -409,7 +410,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
}
|
||||
else
|
||||
{
|
||||
JobBase job = JobManager.GetJob(jobber.GetUser().JobId??-1);
|
||||
JobBase job = JobManager.GetJob(jobber.GetUser().JobId ?? -1);
|
||||
job.StopJob(jobber);
|
||||
CheckPointHandle.DeleteCheckpoints(jobber);
|
||||
ChatService.SendMessage(jobber, $"~y~[JOB]~s~ Du hast deinen Job ~o~{job.Name}~s~ beendet.");
|
||||
|
||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
@@ -147,6 +148,8 @@ namespace ReallifeGamemode.Server.Job
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
[RemoteEvent("startPilotRoute")]
|
||||
public void StartPilotRoute(Player player, string type)
|
||||
{
|
||||
@@ -258,7 +261,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
}
|
||||
else
|
||||
{
|
||||
JobBase job = JobManager.GetJob(jobber.GetUser().JobId??-1);
|
||||
JobBase job = JobManager.GetJob(jobber.GetUser().JobId ?? -1);
|
||||
job.StopJob(jobber);
|
||||
CheckPointHandle.DeleteCheckpoints(jobber);
|
||||
ChatService.SendMessage(jobber, $"~y~[JOB]~s~ Du hast deinen Job ~o~{job.Name}~s~ beendet.");
|
||||
|
||||
@@ -16,6 +16,7 @@ using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Services;
|
||||
using System.Threading;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Main Class (Main.cs)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Job;
|
||||
|
||||
@@ -59,7 +60,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
if (user.GetUser().JobId == 4)
|
||||
{
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId??-1);
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId ?? -1);
|
||||
if (job.GetUsersInJob().Contains(user))
|
||||
{
|
||||
if (!user.IsInVehicle || user.VehicleSeat != 0) return;
|
||||
@@ -166,7 +167,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
}
|
||||
if (temp.LastCheckpoint != 1)
|
||||
{
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId??-1);
|
||||
Job.JobBase job = Managers.JobManager.GetJob(user.GetUser().JobId ?? -1);
|
||||
if (job.GetUsersInJob().Contains(user))
|
||||
{
|
||||
if (user.GetUser().JobId == 3)
|
||||
@@ -201,7 +202,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
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")
|
||||
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());
|
||||
@@ -292,7 +293,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
Vector3 nextCp = list.ElementAt(checkPointsDone);
|
||||
this.player.TriggerEvent("setCheckPoint", nextCp, player, this.checkPointsDone, delay, this.markerID, this.markerSize, this.markerDist, this.useVehicle, this.eventInCheckpoint);
|
||||
}
|
||||
if (checkPointsDone == this.list.Count()-1)
|
||||
if (checkPointsDone == this.list.Count() - 1)
|
||||
{
|
||||
LastCheckpoint = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user