[+] Start WeaponDeal-System
This commit is contained in:
36
ReallifeGamemode.Server/WeaponDeal/WeaponDealPoints.cs
Normal file
36
ReallifeGamemode.Server/WeaponDeal/WeaponDealPoints.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using System.Linq;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
|
||||
namespace ReallifeGamemode.Server.WeaponDeal
|
||||
{
|
||||
public class WeaponDealPoints
|
||||
{
|
||||
public static Dictionary<int, int> factionWeaponDeal = new Dictionary<int, int>();
|
||||
|
||||
|
||||
private static readonly IReadOnlyCollection<Vector3> WT_Route = new List<Vector3>
|
||||
{
|
||||
new Vector3(2465.163, 1589.396, 32.72029),
|
||||
new Vector3(1532.045, 1702.775, 109.7561),
|
||||
new Vector3(58.67861, 3717.103, 39.75301),
|
||||
new Vector3(-2174.734, 4269.301, 48.95574)
|
||||
}.AsReadOnly();
|
||||
|
||||
public static Vector3 getRndWD_Route(int factionID)
|
||||
{
|
||||
if (!factionWeaponDeal.ContainsKey(factionID))
|
||||
return null;
|
||||
|
||||
if(factionWeaponDeal[factionID] == -1)
|
||||
{
|
||||
Random rnd = new Random();
|
||||
factionWeaponDeal[factionID] = rnd.Next(0, WT_Route.Count - 1);
|
||||
}
|
||||
return WT_Route.ElementAt(factionWeaponDeal[factionID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user