Log UserWeapon

This commit is contained in:
VegaZ
2021-04-11 19:28:12 +02:00
parent d27b205242
commit e0a34d8f00
6 changed files with 92 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GTANetworkAPI;
using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Database.Models;
namespace ReallifeGamemode.Server.Shop.Ammunation
{
public class Ammunation
{
public Vector3 vector { get; set; }
public List<Weapon> weaponList = new List<Weapon>();
public Ammunation(Vector3 position)
{
this.vector = vector;
LoadWeapons();
}
public void LoadWeapons()
{
using (var dbContext = new DatabaseContext())
{
weaponList = dbContext.Weapons.ToList();
}
}
}
}