Some improvements

This commit is contained in:
hydrant
2018-12-06 19:32:37 +01:00
parent 6f8d9598a7
commit 54b647c38e
4 changed files with 7 additions and 3 deletions

View File

@@ -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", () => {

View File

@@ -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)

View File

@@ -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);

View File

@@ -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("€", "");
} }
} }
} }