Continue Ammunation
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import * as NativeUI from '../../libs/NativeUI';
|
||||
|
||||
const UIMenu = NativeUI.Menu;
|
||||
const UIMenuItem = NativeUI.UIMenuItem;
|
||||
const UIMenuListItem = NativeUI.UIMenuListItem;
|
||||
const UIMenuCheckboxItem = NativeUI.UIMenuCheckboxItem;
|
||||
const Menu = NativeUI.Menu;
|
||||
const MenuItem = NativeUI.UIMenuItem;
|
||||
const MenuListItem = NativeUI.UIMenuListItem;
|
||||
const MenuCheckboxItem = NativeUI.UIMenuCheckboxItem;
|
||||
const BadgeStyle = NativeUI.BadgeStyle;
|
||||
const Point = NativeUI.Point;
|
||||
const ItemsCollection = NativeUI.ItemsCollection;
|
||||
@@ -11,11 +11,17 @@ const Color = NativeUI.Color;
|
||||
|
||||
export default function ammunation(globalData: IGlobalData) {
|
||||
|
||||
mp.events.add("AmmunationShop:LoadNativeUI")
|
||||
var screenRes = mp.game.graphics.getScreenResolution(0, 0);
|
||||
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.InMenu = true;
|
||||
class Weapon {
|
||||
|
||||
factionInteractionMenu = new Menu("Fraktionsinteraktion", userFactionName, new Point(0, screenRes.y / 3), null, null);
|
||||
}
|
||||
|
||||
mp.events.add("AmmunationShop:LoadNativeUI", (weapons: Weapon[]) => {
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.InMenu = true;
|
||||
|
||||
var ammunationMenu = new Menu("Ammunation", "", new Point(0, screenRes.y / 3), null, null);
|
||||
|
||||
});
|
||||
};
|
||||
8
ReallifeGamemode.Client/global.d.ts
vendored
8
ReallifeGamemode.Client/global.d.ts
vendored
@@ -74,4 +74,12 @@ declare type FactionMember = {
|
||||
|
||||
declare type FactionRank = {
|
||||
|
||||
}
|
||||
|
||||
declare type Weapon = {
|
||||
WeaponModel: string;
|
||||
Category: string;
|
||||
SlotID: number;
|
||||
Ammo: number;
|
||||
Price: number;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Shop.Clothing;
|
||||
using ReallifeGamemode.Server.Shop.SevenEleven;
|
||||
using ReallifeGamemode.Server.Shop.Friseur;
|
||||
using ReallifeGamemode.Server.Shop.Ammunation;
|
||||
|
||||
namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
@@ -14,7 +15,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
|
||||
public static List<ItemShop> itemShops = new List<ItemShop>();
|
||||
public static List<Friseur> FriseurStores = new List<Friseur>();
|
||||
public static List<AmmunationPoint> Ammunations = new List<Ammunation>();
|
||||
public static List<Ammunation> Ammunations = new List<Ammunation>();
|
||||
|
||||
public static void LoadClotheShops()
|
||||
{
|
||||
@@ -82,5 +83,20 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadAmmunations()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
List<SavedBlip> ammunations = dbContext.Blips.ToList().FindAll(s => s.Name == "Ammunation");
|
||||
|
||||
foreach (var store in ammunations)
|
||||
{
|
||||
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
|
||||
Ammunation newShop = new Ammunation(pos);
|
||||
Ammunations.Add(newShop);
|
||||
}
|
||||
NAPI.Util.ConsoleOutput($"Loading {ammunations.Count} Ammunations");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ namespace ReallifeGamemode.Server.Shop.Ammunation
|
||||
return;
|
||||
}
|
||||
|
||||
//List<Weapon> melee = weaponList.ToList().FindAll(w => w.Category == "Pistol");
|
||||
List<Weapon> handguns = weaponList.ToList().FindAll(w => w.Category == "Handgun");
|
||||
//List<Weapon> smgs = weaponList.ToList().FindAll(w => w.Category == "SMG");
|
||||
//List<Weapon> shotguns = weaponList.ToList().FindAll(w => w.Category == "Shotgun");
|
||||
//List<Weapon> assaultrifles = weaponList.ToList().FindAll(w => w.Category == "AssaultRifle");
|
||||
//List<Weapon> lmgs = weaponList.ToList().FindAll(w => w.Category == "LMG");
|
||||
//List<Weapon> sniperrifles = weaponList.ToList().FindAll(w => w.Category == "SniperRifle");
|
||||
//List<Weapon> heavyweapons = weaponList.ToList().FindAll(w => w.Category == "HeavyWeapon");
|
||||
//List<Weapon> throwables = weaponList.ToList().FindAll(w => w.Category == "Throwables");
|
||||
//List<Weapon> melee = weaponList.ToList().FindAll(w => w.Category == "Nahkampfwaffen");
|
||||
List<Weapon> handguns = weaponList.ToList().FindAll(w => w.Category == "Pistolen");
|
||||
//List<Weapon> smgs = weaponList.ToList().FindAll(w => w.Category == "Maschinenpistolen");
|
||||
//List<Weapon> shotguns = weaponList.ToList().FindAll(w => w.Category == "Schrotflinten");
|
||||
//List<Weapon> assaultrifles = weaponList.ToList().FindAll(w => w.Category == "Sturmgewehre");
|
||||
//List<Weapon> lmgs = weaponList.ToList().FindAll(w => w.Category == "Leichte Maschinengewehre");
|
||||
//List<Weapon> sniperrifles = weaponList.ToList().FindAll(w => w.Category == "Scharfschützengewehre");
|
||||
//List<Weapon> heavyweapons = weaponList.ToList().FindAll(w => w.Category == "Schwere Waffen");
|
||||
//List<Weapon> throwables = weaponList.ToList().FindAll(w => w.Category == "Werfbare Waffen");
|
||||
|
||||
List<Array> shopWeapons = new List<Array>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user