From bc77959f4a3ac0b486cf368efb8d99ab81f328d4 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 2 Apr 2020 22:44:31 +0200 Subject: [PATCH] aufzug XD --- .../Managers/PositionManager.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/PositionManager.cs b/ReallifeGamemode.Server/Managers/PositionManager.cs index 746b1cbc..1f7a7ac8 100644 --- a/ReallifeGamemode.Server/Managers/PositionManager.cs +++ b/ReallifeGamemode.Server/Managers/PositionManager.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using GTANetworkAPI; using ReallifeGamemode.Server.Shop.Clothing; using ReallifeGamemode.Server.Shop.SevenEleven; @@ -160,7 +161,7 @@ namespace ReallifeGamemode.Server.Managers clotheshopPoints.Add(shopPoint); } - foreach(ClotheshopPoint s in clotheshopPoints) + foreach (ClotheshopPoint s in clotheshopPoints) { NAPI.Marker.CreateMarker(1, new Vector3(s.Position.X, s.Position.Y, s.Position.Z - 2), new Vector3(s.Position.X, s.Position.Y, s.Position.Z + 1), new Vector3(0, 0, 0), 2, new Color(255, 255, 255, 50), false, 0); @@ -168,7 +169,7 @@ namespace ReallifeGamemode.Server.Managers } - foreach(var shop in ShopManager.itemShops) + foreach (var shop in ShopManager.itemShops) { shop.LoadItems(); ItemshopPoint shopPoint = new ItemshopPoint() @@ -179,7 +180,7 @@ namespace ReallifeGamemode.Server.Managers itemshopPoints.Add(shopPoint); } - foreach(ItemshopPoint s in itemshopPoints) + foreach (ItemshopPoint s in itemshopPoints) { NAPI.Marker.CreateMarker(1, new Vector3(s.Position.X, s.Position.Y, s.Position.Z - 2), new Vector3(s.Position.X, s.Position.Y, s.Position.Z + 1), new Vector3(0, 0, 0), 2, new Color(255, 255, 255, 50), false, 0); @@ -189,7 +190,11 @@ namespace ReallifeGamemode.Server.Managers #endregion Shops } - + [RemoteEvent("sendClientToStage")] + public void ElevatorSendToStage(Player player, string level) + { + player.Position = ElevatorPoints.Where(e => e.Stage == level).First().Position; + } } } @@ -230,4 +235,4 @@ public class ElevatorPoint public int FactionId { get; set; } public string Stage { get; set; } } - +