Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -20,7 +20,7 @@ export default function licenses(globalData: IGlobalData): void {
|
||||
mp.events.add("CEF:LicenseLoaded", () => {
|
||||
licenseBrowser.execute(`add_licenses('${JSON.stringify(globalInfo)}');`);
|
||||
licenseBrowser.execute(`add_licensesholder('${JSON.stringify(globalName)}');`);
|
||||
licenseTimer = setInterval(DestroyLicenses, 7000);
|
||||
licenseTimer = setInterval(DestroyLicenses, 15000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -181,6 +181,18 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
|
||||
var txData = getClothingName(key, item.ClotheId, gender);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
if (txData != undefined && txData.length > 0) {
|
||||
categoryMenu.AddItem(new UIMenuItem(mp.game.ui.getLabelText(txData[0].data[0].GXT), ""));
|
||||
clotheSubMenu = new UIMenu(" ", mp.game.ui.getLabelText(txData[0].data[0].GXT), new Point(0, 0), bannerSprite.library, bannerSprite.texture);
|
||||
clotheSubMenu.Visible = false;
|
||||
categorysMenus.push(categoryMenu);
|
||||
|
||||
}
|
||||
=======
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
|
||||
for (const x of txData) {
|
||||
var itemDescription = (key === 11 ? mp.game.ui.getLabelText(x.undershirt[1].GXT) : " ");
|
||||
@@ -393,7 +405,11 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
nextMenu.menu.Visible = true;
|
||||
menuTransition = true;
|
||||
|
||||
<<<<<<< HEAD
|
||||
// submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
|
||||
=======
|
||||
submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
});
|
||||
|
||||
mainMenu.MenuClose.on(() => {
|
||||
@@ -404,6 +420,35 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
lastClothing = null;
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Sub menu events
|
||||
categoryMenu.ItemSelect.on((selectedItem, itemIndex) => {
|
||||
const nextMenu = clotheMenus[itemIndex];
|
||||
const slot = Number(nextMenu.slotIdx);
|
||||
|
||||
lastClothing = {
|
||||
type: nextMenu.type,
|
||||
slotIdx: slot,
|
||||
drawable: (nextMenu.type === "props" ? localPlayer.getPropIndex(slot) : localPlayer.getDrawableVariation(slot)),
|
||||
texture: (nextMenu.type === "props" ? localPlayer.getPropTextureIndex(slot) : localPlayer.getTextureVariation(slot)),
|
||||
undershirt: [localPlayer.getDrawableVariation(8), localPlayer.getTextureVariation(8)],
|
||||
torso: localPlayer.getDrawableVariation(3)
|
||||
};
|
||||
|
||||
currentMenuIdx = itemIndex;
|
||||
categoryMenu.Visible = false;
|
||||
nextMenu.menu.Visible = true;
|
||||
menuTransition = true;
|
||||
|
||||
submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
|
||||
});
|
||||
|
||||
categoryMenu.MenuClose.on(() => {
|
||||
currentMenuIdx = -1;
|
||||
mainMenu.Visible = true;
|
||||
});
|
||||
=======
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ using System.Text;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Core.Extensions;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Linq;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.Menus
|
||||
{
|
||||
@@ -49,6 +50,9 @@ namespace ReallifeGamemode.Server.Core.Menus
|
||||
|
||||
player.SendMessage("Du hast den Waffenschein erfolgreich erworben.", ChatPrefix.Info);
|
||||
|
||||
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount.Balance += 2500;
|
||||
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount.Balance += 2500;
|
||||
|
||||
user.WeaponLicense = true;
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amount > -9 && amount < 9)
|
||||
if (amount > -13 && amount < 13)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
@@ -640,6 +640,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~.");
|
||||
target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben.", true);
|
||||
ChatService.BroadcastFaction("~y~" + targetname + "~b~ hat von ~g~" + playername + " ~y~" + amount + " ~b~Strafpunkt erhalten. Gesamt: ~y~" + target.GetUser().Points, new List<int>() { 1, 3 });
|
||||
if (target.GetUser().Points < 0)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
@@ -649,10 +650,11 @@ namespace ReallifeGamemode.Server.Managers
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
}
|
||||
else if (target.GetUser().Points >= 8)
|
||||
else if (target.GetUser().Points >= 12)
|
||||
{
|
||||
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~8/8 ~x~Strafpunkten.", true);
|
||||
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~12/12 ~x~Strafpunkten.", true);
|
||||
target.SendNotification($"~w~Dir wird ~r~Auto- ~w~und ~r~Motorradführerschein ~w~entzogen.", true);
|
||||
ChatService.BroadcastFaction("~y~" + targetname + "~b~ hat von ~g~" + playername + " ~y~" + amount + " ~b~Strafpunkt erhalten. Gesamt: ~y~" + target.GetUser().Points, new List<int>() { 1, 3 });
|
||||
foreach (var copPlayer in NAPI.Pools.GetAllPlayers())
|
||||
{
|
||||
User copUser = copPlayer.GetUser();
|
||||
@@ -680,7 +682,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
else
|
||||
{
|
||||
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~y~{target.GetUser().Points}/8 ~x~Strafpunkten.", true);
|
||||
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~y~{target.GetUser().Points}/12 ~x~Strafpunkten.", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ReallifeGamemode.Server.WeaponDeal
|
||||
{
|
||||
private const int WEAPON_AMOUNT_GANG = 2;
|
||||
private const int WEAPON_AMOUNT_COP = 8;
|
||||
private const int WEAPON_AMOUNT_COP_STUNGUN = 2;
|
||||
private const int WEAPON_AMOUNT_COP_STUNGUN = 12;
|
||||
public static bool checkWeaponDbyVehicle(Vehicle vehicle)
|
||||
{
|
||||
if (!vehicle.HasData("WeaponDealLoad") || vehicle.GetData<bool>("WeaponDealLoad") == false)
|
||||
|
||||
Reference in New Issue
Block a user