Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
CroniX
2021-01-28 21:36:04 +01:00
6 changed files with 19 additions and 9 deletions

View File

@@ -178,13 +178,13 @@ export default function clotheShopList(globalData: IGlobalData) {
var txData = getClothingName(key, item.ClotheId, gender);
for (const x of txData) {
//var itemDescription = (key === 11 ? mp.game.ui.getLabelText(x.undershirt[1].GXT) : "Clothing item.");
var itemDescription = (key === 11 ? x.undershirt[1].GXT + " - " + x.id: "Clothing item.");
var itemDescription = (key === 11 ? mp.game.ui.getLabelText(x.undershirt[1].GXT) : "Clothing item.");
//var itemDescription = (key === 11 ? x.undershirt[1].GXT + " - " + x.id: "Clothing item.");
if (itemDescription == "NULL") {
itemDescription = "Clothing item.";
}
//const tempItem = new UIMenuItem(mp.game.ui.getLabelText(x.data[0].GXT), itemDescription);
const tempItem = new UIMenuItem(x.data[0].GXT + " - " + x.id , itemDescription);
const tempItem = new UIMenuItem(mp.game.ui.getLabelText(x.data[0].GXT), itemDescription);
//const tempItem = new UIMenuItem(x.data[0].GXT + " - " + x.id , itemDescription);
tempItem.SetRightLabel(`${item.Price > 0 ? `$${item.Price}` : "FREE"}`);

View File

@@ -116,8 +116,8 @@ export default function friseurShopList(globalData: IGlobalData) {
if (itemDescription == "NULL") {
itemDescription = "Clothing item.";
}
//const tempItem = new UIMenuItem(mp.game.ui.getLabelText(x.data[0].GXT), itemDescription);
const tempItem = new UIMenuItem(x.data[0].GXT + " - " + x.id, itemDescription);
const tempItem = new UIMenuItem(mp.game.ui.getLabelText(x.data[0].GXT), itemDescription);
//const tempItem = new UIMenuItem(x.data[0].GXT + " - " + x.id, itemDescription);
tempItem.SetRightLabel(`${item.Price > 0 ? `$${item.Price}` : "FREE"}`);

View File

@@ -5,6 +5,7 @@ using Newtonsoft.Json;
using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Extensions;
using System;
namespace ReallifeGamemode.Server.Events
{
@@ -278,6 +279,14 @@ namespace ReallifeGamemode.Server.Events
undershirt.Texture = data[5];
}
}
if(data[0] == 2){
User payer = client.GetUser(dbContext);
payer.GetCharacter(dbContext);
payer.Character.Hair = Convert.ToByte(data[2]);
dbContext.SaveChanges();
}
client.GetUser(dbContext).Handmoney -= data[6];
dbContext.SaveChanges();
//client.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney);
@@ -285,6 +294,7 @@ namespace ReallifeGamemode.Server.Events
client.TriggerEvent("clothesMenu:updateLast", data[2], data[1], data[4], data[5], data[3]);
}
}
[RemoteEvent("SERVER:BuyHairColor")]
public void BuyHairColor(Player client, byte HairColor)

View File

@@ -11,7 +11,7 @@ namespace ReallifeGamemode.Server.Inventory.Items
public override int Id => 6;
public override string Name => "CarbineRifle";
public override string Description => "Waffe";
public override int Gewicht => 4000;
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 => 4;
public override string Name => "Combatpistol";
public override string Description => "Waffe";
public override int Gewicht => 1180;
public override int Gewicht => 500;
public override string Einheit => "g";
public override uint Object => 3666746839; //3061944032
public override int Price => 0;

View File

@@ -13,7 +13,7 @@ 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 = 5;
private const int WEAPON_AMOUNT_COP_STUNGUN = 2;
public static bool checkWeaponDbyVehicle(Vehicle vehicle)
{