Some improvements
This commit is contained in:
@@ -69,7 +69,7 @@ mp.events.add("toggleUi", (show) => {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
mp.events.add("updateMoney", (money) => {
|
mp.events.add("updateMoney", (money) => {
|
||||||
playerMoney = money;
|
playerMoney = money.toLocaleString("de-DE", { minimumFractionDigits: 0 });
|
||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add("render", () => {
|
mp.events.add("render", () => {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace reallife_gamemode.Server.Events
|
|||||||
[ServerEvent(Event.PlayerDeath)]
|
[ServerEvent(Event.PlayerDeath)]
|
||||||
public void OnPlayerDeath(Client player, Client killer, uint reason)
|
public void OnPlayerDeath(Client player, Client killer, uint reason)
|
||||||
{
|
{
|
||||||
|
if (!player.IsLoggedIn()) player.Kick();
|
||||||
player.SetData("isDead", true);
|
player.SetData("isDead", true);
|
||||||
|
|
||||||
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
|
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ namespace reallife_gamemode.Server.Events
|
|||||||
{
|
{
|
||||||
Name = player.Name,
|
Name = player.Name,
|
||||||
SocialClubName = player.SocialClubName,
|
SocialClubName = player.SocialClubName,
|
||||||
Password = NAPI.Util.GetHashSha256(password)
|
Password = NAPI.Util.GetHashSha256(password),
|
||||||
|
PositionX = Main.DEFAULT_SPAWN_POSITION.X,
|
||||||
|
PositionY = Main.DEFAULT_SPAWN_POSITION.Y,
|
||||||
|
PositionZ = Main.DEFAULT_SPAWN_POSITION.Z
|
||||||
};
|
};
|
||||||
|
|
||||||
dbContext.Users.Add(user);
|
dbContext.Users.Add(user);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace reallife_gamemode.Server.Extensions
|
|||||||
}
|
}
|
||||||
public static string ToMoneyString(this int money)
|
public static string ToMoneyString(this int money)
|
||||||
{
|
{
|
||||||
return string.Format(Main.SERVER_CULTURE, "{0:C0}", money).Replace('€', '$');
|
return "$" + string.Format(Main.SERVER_CULTURE, "{0:C0}", money).Replace("€", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user