using System; using System.Collections.Generic; using System.Linq; using GTANetworkAPI; namespace ReallifeGamemode.Server.WeaponDeal { public class WeaponDealPoints { public static Dictionary factionWeaponDeal = new Dictionary(); public static readonly IReadOnlyCollection WT_Route = new List { new Vector3(-2174.734, 4269.301, 46.95574), // U.S. Armee new Vector3(58.67861, 3717.103, 37.75301), // Lost MC new Vector3(2530.14, 2617.15, 35.76), // Triaden new Vector3(1532.045, 1702.775, 107.7561), // Albanische Mafia new Vector3(-3179.78, 820.08, 1.59) // Madrazo Kartell }.AsReadOnly(); public static readonly IReadOnlyCollection StaatsFrakWT_Route = new List { new Vector3(3627.138, 3759.711, 25.515), //Humane Labs new Vector3(-1805.300, 3101.446, 29.841) //Army Base }.AsReadOnly(); public static Vector3 getRndWD_Route(int factionID) { if (!factionWeaponDeal.ContainsKey(factionID)) return new Vector3(); if (factionID == 1 | factionID == 3) { Random rnd = new Random(); factionWeaponDeal[factionID] = rnd.Next(0, StaatsFrakWT_Route.Count); return StaatsFrakWT_Route.ElementAt(factionWeaponDeal[factionID]); } else { Random rnd = new Random(); factionWeaponDeal[factionID] = rnd.Next(0, WT_Route.Count); return WT_Route.ElementAt(factionWeaponDeal[factionID]); } } } }