Add Paycheck to interaction menu
This commit is contained in:
@@ -45,7 +45,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
ChatService.SendMessage(client, "~g~[PAYCHECK]~s~ Grundsteuer (Haus) : ~r~-$" + Economy.Paychecks[user.Id].PropertyTaxation);
|
||||
ChatService.SendMessage(client, "~g~[PAYCHECK]~s~ Mietkosten : ~r~-$" + Economy.Paychecks[user.Id].RentalFees);
|
||||
ChatService.SendMessage(client, "~g~[PAYCHECK]~s~ Einkommen Steuer : ~r~" + (int)(Economy.Paychecks[user.Id].FinancialInterest * 100) + " %");
|
||||
ChatService.SendMessage(client, "");
|
||||
ChatService.SendMessage(client, " ");
|
||||
ChatService.SendMessage(client, "~g~[PAYCHECK]~s~ Ausgaben : ~r~-$" + (Economy.Paychecks[user.Id].Wage - Economy.Paychecks[user.Id].Amount));
|
||||
ChatService.SendMessage(client, "~g~[PAYCHECK] -------------------------------------------------------");
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Server.Classes;
|
||||
using ReallifeGamemode.Server.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Factions.Medic;
|
||||
using ReallifeGamemode.Server.Finance;
|
||||
using ReallifeGamemode.Server.Inventory;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Server.Models;
|
||||
@@ -105,6 +106,9 @@ namespace ReallifeGamemode.Server.Events
|
||||
User u = player.GetUser();
|
||||
if (u == null) return;
|
||||
|
||||
Paycheck paycheck = null;
|
||||
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
|
||||
|
||||
var accountData = new
|
||||
{
|
||||
regDate = u.RegistrationDate.ToShortDateString(),
|
||||
@@ -113,7 +117,8 @@ namespace ReallifeGamemode.Server.Events
|
||||
factionRank = u.GetFactionRank().RankName,
|
||||
group = u.Group?.Name ?? "Keine",
|
||||
groupRank = u.GroupRank.GetName(),
|
||||
job = JobManager.GetJob(u.JobId ?? 0)?.Name ?? "Keiner"
|
||||
job = JobManager.GetJob(u.JobId ?? 0)?.Name ?? "Keiner",
|
||||
paycheck
|
||||
};
|
||||
|
||||
string faction = u.FactionLeader ? u.Faction.Name : null;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Server.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Models;
|
||||
@@ -12,12 +13,25 @@ namespace ReallifeGamemode.Server.Finance
|
||||
{
|
||||
public class Paycheck
|
||||
{
|
||||
[JsonProperty("financialHelp")]
|
||||
public float FinancialHelp { get; set; } = 0;
|
||||
|
||||
[JsonProperty("financialInterest")]
|
||||
public float FinancialInterest { get; set; } = 0;
|
||||
|
||||
[JsonProperty("vehicleTaxation")]
|
||||
public int VehicleTaxation { get; set; } = 0;
|
||||
|
||||
[JsonProperty("propertyTaxation")]
|
||||
public float PropertyTaxation { get; set; } = 0;
|
||||
|
||||
[JsonProperty("wage")]
|
||||
public int Wage { get; set; } = 0;
|
||||
|
||||
[JsonProperty("amount")]
|
||||
public int Amount { get; set; } = 0;
|
||||
|
||||
[JsonProperty("rentalFees")]
|
||||
public int RentalFees { get; set; } = 0;
|
||||
|
||||
public Paycheck(float FinancialHelp, float FinancialInterest, int VehicleTaxation, float PropertyTaxation, int Wage, int Amount, int RentalFees)
|
||||
|
||||
Reference in New Issue
Block a user