add airmakes faction changes (wt)

This commit is contained in:
michael.reiswich
2021-04-11 00:19:07 +02:00
parent 8c0e440d2e
commit a672428446
9 changed files with 71 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ export default function weaponList(globalData: IGlobalData) {
//Weapon Menu
mp.events.add('showWeaponMenu', (primariesArr, secondariesArr, meleesArr, specialsArr, armorArr, jsonTime, pistol_Amount, pistol50_Amount, Pistol_mk2_Amount, Combatpistol_Amount, SMG_Amount, Carbinerifle_Amount, Compactrifle_Amount, sniperrifle_Amount, Pumpshotgun_Amount, Schutzweste_Amount, Stungun_Amount) => {
mp.events.add('showWeaponMenu', (primariesArr, secondariesArr, meleesArr, specialsArr, armorArr, jsonTime, pistol_Amount, pistol50_Amount, Pistol_mk2_Amount, Combatpistol_Amount, SMG_Amount, Carbinerifle_Amount, Compactrifle_Amount, sniperrifle_Amount, Pumpshotgun_Amount, Schutzweste_Amount, Stungun_Amount, CombatPDW_Amount, assaultrifle_Amount) => {
if (!globalData.InMenu) {
globalData.InMenu = true;
@@ -133,9 +133,15 @@ export default function weaponList(globalData: IGlobalData) {
var menuItem = new UIMenuItem("SMG");
menuItem.SetRightLabel(SMG_Amount);
weaponStockMenu.AddItem(menuItem);
var menuItem = new UIMenuItem("Combat PDW");
menuItem.SetRightLabel(CombatPDW_Amount);
weaponStockMenu.AddItem(menuItem);
var menuItem = new UIMenuItem("Carbinerifle");
menuItem.SetRightLabel(Carbinerifle_Amount);
weaponStockMenu.AddItem(menuItem);
var menuItem = new UIMenuItem("Assaultrifle");
menuItem.SetRightLabel(assaultrifle_Amount);
weaponStockMenu.AddItem(menuItem);
var menuItem = new UIMenuItem("Compactrifle");
menuItem.SetRightLabel(Compactrifle_Amount);
weaponStockMenu.AddItem(menuItem);

View File

@@ -0,0 +1 @@
<svg height="504pt" viewBox="0 -71 504 503" width="504pt" xmlns="http://www.w3.org/2000/svg"><path d="m388 56.5h-60v304h120v-304zm0 0" fill="#656d78"/><path d="m304 80.5h-280v256h280zm24-24v304h-328v-304zm0 0" fill="#ffd2a6"/><path d="m300 80.5c2.199219 0 4 1.800781 4 4v248c0 2.199219-1.800781 4-4 4h-272c-2.199219 0-4-1.800781-4-4v-248c0-2.199219 1.800781-4 4-4zm0 0" fill="#ed5565"/><path d="m56 .5h328l-56 56h-328zm0 0" fill="#f2c397"/><path d="m448 56.5h-24l56-56h24zm0 0" fill="#ccd1d9"/><path d="m480 .5-56 56h-96l56-56zm0 0" fill="#ccd1d9"/><path d="m504 .5v304l-56 56v-304zm0 0" fill="#e6e9ed"/><path d="m276 104.5c2.199219 0 4 1.800781 4 4v24c0 2.199219-1.800781 4-4 4h-224c-2.199219 0-4-1.800781-4-4v-24c0-2.199219 1.800781-4 4-4zm0 0" fill="#656d78"/><path d="m267.328125 214.292969c-.703125-1.058594-17.761719-25.785157-67.328125-25.792969-1.0625 0-2.078125.425781-2.832031 1.167969-.753907.742187-1.167969 1.769531-1.167969 2.832031v48.015625c0 2.207031 1.792969 4 4 4 49.566406 0 66.625-24.734375 67.328125-25.792969.894531-1.34375.894531-3.085937 0-4.429687zm0 0" fill="#ffce54"/><g fill="#f5f7fa"><path d="m184.238281 228.5c-2.207031 0-4.039062-1.792969-4.039062-4s1.753906-4 3.960937-4h.085938c2.203125 0 4 1.792969 4 4s-1.796875 4-4.007813 4zm0 0"/><path d="m184 244.507812h-72c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h72c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0"/><path d="m184 212.5h-56c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h56c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m168 228.5h-88c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h88c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m184 196.5h-16c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h16c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm-32 0h-96c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h96c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m112 212.5h-8c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h8c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/></g><path d="m383.984375 184.523438v131.953124c-4.398437 0-8 3.597657-8 8v8h-32v-8c0-4.402343-3.601563-8-8-8v-131.953124l8-16v-16h32v16zm0 0" fill="#f6bb42"/><path d="m359.984375 80.523438s-16 32-16 64v8h32v-8c0-32-16-64-16-64zm0 0" fill="#fc6e51"/><path d="m379.984375 336.476562h-40.007813c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h40.007813c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m359.984375 304.46875c-2.207031 0-4-1.792969-4-4v-106.578125c0-2.207031 1.792969-4 4-4s4 1.792969 4 4v106.578125c0 2.207031-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m440.015625 184.523438v131.953124c-4.398437 0-8 3.597657-8 8v8h-32v-8c0-4.402343-3.601563-8-8-8v-131.953124l8-16v-16h32v16zm0 0" fill="#f6bb42"/><path d="m416.015625 80.523438s-16 32-16 64v8h32v-8c0-32-16-64-16-64zm0 0" fill="#fc6e51"/><path d="m436.015625 336.476562h-40.007813c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h40.007813c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m416.015625 304.46875c-2.207031 0-4-1.792969-4-4v-106.578125c0-2.207031 1.792969-4 4-4s4 1.792969 4 4v106.578125c0 2.207031-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m239.984375 124.5h-151.96875c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h151.96875c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#545c66"/><path d="m256 300.5h-184c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h184c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#da4453"/><path d="m200 316.5h-72c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h72c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#da4453"/><path d="m308 40.5h-248c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h248c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#ffd2a6"/><path d="m324 24.5h-248c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h248c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#ffd2a6"/></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1 @@
<svg height="504pt" viewBox="0 -71 504 503" width="504pt" xmlns="http://www.w3.org/2000/svg"><path d="m388 56.5h-60v304h120v-304zm0 0" fill="#656d78"/><path d="m304 80.5h-280v256h280zm24-24v304h-328v-304zm0 0" fill="#ffd2a6"/><path d="m300 80.5c2.199219 0 4 1.800781 4 4v248c0 2.199219-1.800781 4-4 4h-272c-2.199219 0-4-1.800781-4-4v-248c0-2.199219 1.800781-4 4-4zm0 0" fill="#ed5565"/><path d="m56 .5h328l-56 56h-328zm0 0" fill="#f2c397"/><path d="m448 56.5h-24l56-56h24zm0 0" fill="#ccd1d9"/><path d="m480 .5-56 56h-96l56-56zm0 0" fill="#ccd1d9"/><path d="m504 .5v304l-56 56v-304zm0 0" fill="#e6e9ed"/><path d="m276 104.5c2.199219 0 4 1.800781 4 4v24c0 2.199219-1.800781 4-4 4h-224c-2.199219 0-4-1.800781-4-4v-24c0-2.199219 1.800781-4 4-4zm0 0" fill="#656d78"/><path d="m267.328125 214.292969c-.703125-1.058594-17.761719-25.785157-67.328125-25.792969-1.0625 0-2.078125.425781-2.832031 1.167969-.753907.742187-1.167969 1.769531-1.167969 2.832031v48.015625c0 2.207031 1.792969 4 4 4 49.566406 0 66.625-24.734375 67.328125-25.792969.894531-1.34375.894531-3.085937 0-4.429687zm0 0" fill="#ffce54"/><g fill="#f5f7fa"><path d="m184.238281 228.5c-2.207031 0-4.039062-1.792969-4.039062-4s1.753906-4 3.960937-4h.085938c2.203125 0 4 1.792969 4 4s-1.796875 4-4.007813 4zm0 0"/><path d="m184 244.507812h-72c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h72c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0"/><path d="m184 212.5h-56c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h56c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m168 228.5h-88c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h88c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m184 196.5h-16c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h16c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm-32 0h-96c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h96c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/><path d="m112 212.5h-8c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h8c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0"/></g><path d="m383.984375 184.523438v131.953124c-4.398437 0-8 3.597657-8 8v8h-32v-8c0-4.402343-3.601563-8-8-8v-131.953124l8-16v-16h32v16zm0 0" fill="#f6bb42"/><path d="m359.984375 80.523438s-16 32-16 64v8h32v-8c0-32-16-64-16-64zm0 0" fill="#fc6e51"/><path d="m379.984375 336.476562h-40.007813c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h40.007813c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m359.984375 304.46875c-2.207031 0-4-1.792969-4-4v-106.578125c0-2.207031 1.792969-4 4-4s4 1.792969 4 4v106.578125c0 2.207031-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m440.015625 184.523438v131.953124c-4.398437 0-8 3.597657-8 8v8h-32v-8c0-4.402343-3.601563-8-8-8v-131.953124l8-16v-16h32v16zm0 0" fill="#f6bb42"/><path d="m416.015625 80.523438s-16 32-16 64v8h32v-8c0-32-16-64-16-64zm0 0" fill="#fc6e51"/><path d="m436.015625 336.476562h-40.007813c-2.207031 0-4-1.792968-4-4 0-2.207031 1.792969-4 4-4h40.007813c2.207031 0 4 1.792969 4 4 0 2.207032-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m416.015625 304.46875c-2.207031 0-4-1.792969-4-4v-106.578125c0-2.207031 1.792969-4 4-4s4 1.792969 4 4v106.578125c0 2.207031-1.792969 4-4 4zm0 0" fill="#ffce54"/><path d="m239.984375 124.5h-151.96875c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h151.96875c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#545c66"/><path d="m256 300.5h-184c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h184c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#da4453"/><path d="m200 316.5h-72c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h72c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#da4453"/><path d="m308 40.5h-248c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h248c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#ffd2a6"/><path d="m324 24.5h-248c-2.207031 0-4-1.792969-4-4s1.792969-4 4-4h248c2.207031 0 4 1.792969 4 4s-1.792969 4-4 4zm0 0" fill="#ffd2a6"/></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -45,6 +45,14 @@
modifier = 0.25;
meelemodifier = 1;
break;
case 0x0A3D4D34: //Combat PDW
modifier = 0.185;
meelemodifier = 1;
break;
case 0xBFEFFF6D: //assaultrifle
modifier = 0.225;
meelemodifier = 1;
break;
case 0x1D073A89: //Pumpshotgun
modifier = 0.2;
meelemodifier = 1;

View File

@@ -361,6 +361,8 @@ namespace ReallifeGamemode.Server.Events
int Pumpshotgun_Amount = 0;
int Schutzweste_Amount = 0;
int Stungun_Amount = 0;
int CombatPDW_Amount = 0;
int Assaultrifle_Amount = 0;
string dealTime = "Starten";
primarys.Add("Keine");
secondarys.Add("Keine");
@@ -489,10 +491,18 @@ namespace ReallifeGamemode.Server.Events
{
Stungun_Amount = weapon.Ammount;
}
else if (weapon.WeaponModel == "assaultrifle")
{
Assaultrifle_Amount = weapon.Ammount;
}
else if (weapon.WeaponModel == "CombatPDW")
{
CombatPDW_Amount = weapon.Ammount;
}
}
}
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray(), armor.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()); ;
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray(), armor.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(), CombatPDW_Amount.ToString(), Assaultrifle_Amount.ToString()); ;
}
if (nearestJailReleasePoint != null)
{

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.Inventory.Items
{
class AssaultRifle : WeaponDealItem
{
public override int Id => 13;
public override string Name => "AssaultRifle";
public override string Description => "Waffe";
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.Inventory.Items
{
class CombatPDW : WeaponDealItem
{
public override int Id => 12;
public override string Name => "CombatPDW";
public override string Description => "Waffe";
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;
}
}

View File

@@ -9,7 +9,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 7;
public override string Name => "CompactRifle";
public override string Description => "Waffe";
public override int Gewicht => 3080;
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -13,8 +13,8 @@ namespace ReallifeGamemode.Server.WeaponDeal
public class WeaponDealManager : Script
{
private const int WEAPON_AMOUNT_GANG = 2;
private const int WEAPON_AMOUNT_COP = 8;
private const int WEAPON_AMOUNT_COP_STUNGUN = 12;
private const int WEAPON_AMOUNT_COP = 4;
private const int WEAPON_AMOUNT_COP_STUNGUN = 4;
public static bool checkWeaponDbyVehicle(Vehicle vehicle)
{
if (!vehicle.HasData("WeaponDealLoad") || vehicle.GetData<bool>("WeaponDealLoad") == false)
@@ -201,6 +201,8 @@ namespace ReallifeGamemode.Server.WeaponDeal
InventoryManager.AddItemToVehicleInventory(fVeh, item2.ItemId, item2.Amount);
VehicleItem item4 = new VehicleItem() { ItemId = 7, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_GANG * oMembers }; //CompactRifle
InventoryManager.AddItemToVehicleInventory(fVeh, item4.ItemId, item4.Amount);
VehicleItem item5 = new VehicleItem() { ItemId = 13, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_GANG * oMembers }; //AssaultRifle
InventoryManager.AddItemToVehicleInventory(fVeh, item5.ItemId, item5.Amount);
}
else if (factionVehicle.GetOwners().Contains(1))
{
@@ -231,6 +233,8 @@ namespace ReallifeGamemode.Server.WeaponDeal
InventoryManager.AddItemToVehicleInventory(fVeh, item5.ItemId, item5.Amount);
VehicleItem item6 = new VehicleItem() { ItemId = 11, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_COP_STUNGUN * oMembers }; //Stungun
InventoryManager.AddItemToVehicleInventory(fVeh, item6.ItemId, item6.Amount);
VehicleItem item7 = new VehicleItem() { ItemId = 12, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_COP * oMembers }; //CombatPDW
InventoryManager.AddItemToVehicleInventory(fVeh, item7.ItemId, item7.Amount);
}
ChatService.BroadcastFaction("~y~[WAFFENDEAL] ~w~Der Transporter wurde erfolgreich beladen.", new List<int>() { client.GetUser().Faction.Id });