ist das denn die möglichkeit?

This commit is contained in:
hydrant
2020-05-10 23:28:44 +02:00
parent ccbf1ff41c
commit 8bf8944596
8 changed files with 34 additions and 25 deletions

View File

@@ -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;
/**
@@ -154,12 +155,12 @@ namespace ReallifeGamemode.Server.Events
/*if (player.Vehicle.GetData<bool>("timerJobVehicleRespawn") == true)
{*/
if (player.Vehicle.GetServerVehicle() is JobVehicle vehJ)
{
ChatService.SendMessage(player, "Debug4");
player.Vehicle.ResetData("timerJobVehicleRespawn");
ServerVehicle sVeh = Managers.VehicleManager.GetServerVehicleFromVehicle(player.Vehicle);
ServerVehicleExtensions.Spawn(sVeh, player.Vehicle);
}
{
ChatService.SendMessage(player, "Debug4");
player.Vehicle.ResetData("timerJobVehicleRespawn");
ServerVehicle sVeh = Managers.VehicleManager.GetServerVehicleFromVehicle(player.Vehicle);
ServerVehicleExtensions.Spawn(sVeh, player.Vehicle);
}
else
{
ChatService.SendMessage(player, "Debug5");
@@ -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);
}
}

View File

@@ -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");
}
}
}

View File

@@ -183,17 +183,17 @@ namespace ReallifeGamemode.Server.Events
if (!player.IsLoggedIn()) return;
var user = player.GetUser();
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"));
ElevatorPoint nearestElevatorPoint = PositionManager.ElevatorPoints.Find(e => e.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3));
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)
{
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"));
ElevatorPoint nearestElevatorPoint = PositionManager.ElevatorPoints.Find(e => e.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3));
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));
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;

View File

@@ -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)