handmoney fix
This commit is contained in:
@@ -21,6 +21,9 @@ namespace ReallifeGamemode.Database.Entities
|
|||||||
[NotMapped]
|
[NotMapped]
|
||||||
private int _wanteds;
|
private int _wanteds;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
private int _handMoney;
|
||||||
|
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
@@ -40,7 +43,16 @@ namespace ReallifeGamemode.Database.Entities
|
|||||||
public AdminLevel AdminLevel { get; set; }
|
public AdminLevel AdminLevel { get; set; }
|
||||||
|
|
||||||
public bool Dead { get; set; }
|
public bool Dead { get; set; }
|
||||||
public int Handmoney { get; set; }
|
public int Handmoney
|
||||||
|
{
|
||||||
|
get => _handMoney;
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_handMoney = value;
|
||||||
|
Player.TriggerEvent("SERVER:SET_HANDMONEY", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public float PositionX { get; set; }
|
public float PositionX { get; set; }
|
||||||
public float PositionY { get; set; }
|
public float PositionY { get; set; }
|
||||||
|
|||||||
@@ -210,8 +210,13 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
//Alle Spieler
|
//Alle Spieler
|
||||||
foreach (Player player in NAPI.Pools.GetAllPlayers())
|
foreach (Player player in NAPI.Pools.GetAllPlayers())
|
||||||
{
|
{
|
||||||
Vector3 pos = player.Position;
|
|
||||||
User user = player.GetUser(saveAll);
|
User user = player.GetUser(saveAll);
|
||||||
|
if (user == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 pos = player.Position;
|
||||||
user.PositionX = pos.X;
|
user.PositionX = pos.X;
|
||||||
user.PositionY = pos.Y;
|
user.PositionY = pos.Y;
|
||||||
user.PositionZ = pos.Z;
|
user.PositionZ = pos.Z;
|
||||||
|
|||||||
Reference in New Issue
Block a user