change weaponAmmo & add WeaponStock at WeaponMenu
This commit is contained in:
@@ -342,6 +342,17 @@ namespace ReallifeGamemode.Server.Events
|
||||
List<string> melees = new List<string>();
|
||||
List<string> specials = new List<string>();
|
||||
List<string> timer = new List<string>();
|
||||
int pistol_Amount = 0;
|
||||
int pistol50_Amount = 0;
|
||||
int Pistol_mk2_Amount = 0;
|
||||
int Combatpistol_Amount = 0;
|
||||
int SMG_Amount = 0;
|
||||
int Carbinerifle_Amount = 0;
|
||||
int Compactrifle_Amount = 0;
|
||||
int sniperrifle_Amount = 0;
|
||||
int Pumpshotgun_Amount = 0;
|
||||
int Schutzweste_Amount = 0;
|
||||
int Stungun_Amount = 0;
|
||||
string dealTime = "Starten";
|
||||
primarys.Add("Keine");
|
||||
secondarys.Add("Keine");
|
||||
@@ -386,7 +397,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
List<FactionWeapon> weapons = context.FactionWeapons.Where(w => w.FactionId == user.FactionId).ToList();
|
||||
Database.Entities.Faction faction = context.Factions.Where(fac => fac.Id == user.FactionId).FirstOrDefault();
|
||||
|
||||
|
||||
if (faction.WeaponDealTime > 0)
|
||||
dealTime = "noch " + faction.WeaponDealTime.ToString() + " min. übrig";
|
||||
|
||||
@@ -418,10 +429,56 @@ namespace ReallifeGamemode.Server.Events
|
||||
specials.Add(weapon.WeaponModel.ToString());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
foreach (var weapon in weapons)
|
||||
{
|
||||
if (weapon.WeaponModel == "Pistol")
|
||||
{
|
||||
pistol_Amount = weapon.Ammount;
|
||||
}
|
||||
else if(weapon.WeaponModel == "Pistol50"){
|
||||
pistol50_Amount = weapon.Ammount;
|
||||
}
|
||||
else if(weapon.WeaponModel == "Pistol_MK2") {
|
||||
Pistol_mk2_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "Combatpistol")
|
||||
{
|
||||
Combatpistol_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "SMG")
|
||||
{
|
||||
SMG_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "CarbineRifle")
|
||||
{
|
||||
Carbinerifle_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "CompactRifle")
|
||||
{
|
||||
Compactrifle_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "sniperrifle")
|
||||
{
|
||||
sniperrifle_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "PumpShotgun")
|
||||
{
|
||||
Pumpshotgun_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "Schutzweste")
|
||||
{
|
||||
Schutzweste_Amount = weapon.Ammount;
|
||||
}
|
||||
else if (weapon.WeaponModel == "Stungun")
|
||||
{
|
||||
Stungun_Amount = weapon.Ammount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray(), JsonConvert.SerializeObject(timer.ToArray()));
|
||||
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray(), JsonConvert.SerializeObject(timer.ToArray()), pistol_Amount.ToString(), pistol50_Amount.ToString(), Pistol_mk2_Amount.ToString(), Combatpistol_Amount.ToString(), SMG_Amount.ToString(), Carbinerifle_Amount.ToString(), Compactrifle_Amount.ToString(), sniperrifle_Amount.ToString(), Pumpshotgun_Amount.ToString(), Schutzweste_Amount.ToString(), Stungun_Amount.ToString());
|
||||
}
|
||||
if (nearestJailReleasePoint != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user