Change Money type from float to int
This commit is contained in:
@@ -1556,7 +1556,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
}
|
||||
|
||||
[Command("setmoney")]
|
||||
public void SetPlayerMoney(Client player, string receiver, float amount)
|
||||
public void SetPlayerMoney(Client player, string receiver, int amount)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
@@ -1580,7 +1580,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
}
|
||||
|
||||
[Command("givemoney")]
|
||||
public void GivePlayerMoney(Client player, string receiver, float amount)
|
||||
public void GivePlayerMoney(Client player, string receiver, int amount)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
@@ -1605,7 +1605,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
|
||||
//TODO
|
||||
[Command("fpay")]
|
||||
public void FPay(Client player, string receiver, float amount)
|
||||
public void FPay(Client player, string receiver, int amount)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
public int Id { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Name { get; set; }
|
||||
public float BankAccount { get; set; }
|
||||
public int BankAccount { get; set; }
|
||||
public bool StateOwned { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
public string Bic { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Iban { get; set; }
|
||||
public float Balance { get; set; }
|
||||
public int Balance { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
public VehicleHash Model { get; set; }
|
||||
[StringLength(32)]
|
||||
public string ModelName { get; set; }
|
||||
public float Price { get; set; }
|
||||
public int Price { get; set; }
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
{
|
||||
public class UserBankAccount
|
||||
{
|
||||
private float _balance;
|
||||
private int _balance;
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -31,7 +31,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
public string Bic { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Iban { get; set; }
|
||||
public float Balance {
|
||||
public int Balance {
|
||||
get => _balance;
|
||||
set
|
||||
{
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace reallife_gamemode.Server.Logs
|
||||
|
||||
[StringLength(32)]
|
||||
public string Sender { get; set; }
|
||||
public float SenderBalance { get; set; }
|
||||
public float MoneySent { get; set; }
|
||||
public int SenderBalance { get; set; }
|
||||
public int MoneySent { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Receiver { get; set; }
|
||||
public float ReceiverBalance { get; set; }
|
||||
public float NewSenderBalance { get; set; }
|
||||
public float NewReceiverBalance { get; set; }
|
||||
public float Fee { get; set; }
|
||||
public int ReceiverBalance { get; set; }
|
||||
public int NewSenderBalance { get; set; }
|
||||
public int NewReceiverBalance { get; set; }
|
||||
public int Fee { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Origin { get; set; }
|
||||
[Timestamp]
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace reallife_gamemode.Server.Managers
|
||||
{
|
||||
public class BankManager : Script
|
||||
{
|
||||
public static void TransferUserMoneyToUser(User sender, User receiver, float amount, string origin)
|
||||
public static void TransferUserMoneyToUser(User sender, User receiver, int amount, string origin)
|
||||
{
|
||||
using (var transferMoney = new Model.DatabaseContext())
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace reallife_gamemode.Server.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public static void TransferUserMoneyToFaction(User sender, Faction receiver, float amount, string origin)
|
||||
public static void TransferUserMoneyToFaction(User sender, Faction receiver, int amount, string origin)
|
||||
{
|
||||
using (var transferMoney = new Model.DatabaseContext())
|
||||
{
|
||||
@@ -65,7 +65,7 @@ namespace reallife_gamemode.Server.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public static void TransferFactionMoneyToUser(Faction sender, User receiver, float amount, string origin)
|
||||
public static void TransferFactionMoneyToUser(Faction sender, User receiver, int amount, string origin)
|
||||
{
|
||||
using (var transferMoney = new Model.DatabaseContext())
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace reallife_gamemode.Server.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public static void TransferFactionMoneyToFaction(Faction sender, Faction receiver, float amount, string origin)
|
||||
public static void TransferFactionMoneyToFaction(Faction sender, Faction receiver, int amount, string origin)
|
||||
{
|
||||
using (var transferMoney = new Model.DatabaseContext())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user