fix privatcar sell & and make something smarter

This commit is contained in:
Michael
2020-06-02 19:24:54 +02:00
parent 98a2f35613
commit 9f52b2b559
2 changed files with 39 additions and 98 deletions

View File

@@ -610,8 +610,7 @@ namespace ReallifeGamemode.Server.Managers
string nameOrId = (string)JsonConvert.DeserializeObject(jsonNameOrId);
int amount = Int32.Parse(stringAmount);
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
string playername = NAPI.Player.GetPlayerName(player);
string targetname = NAPI.Player.GetPlayerName(target);
if (target == null || !target.IsLoggedIn())
{
ChatService.PlayerNotFound(player);
@@ -623,6 +622,9 @@ namespace ReallifeGamemode.Server.Managers
}
else
{
string playername = NAPI.Player.GetPlayerName(player);
string targetname = NAPI.Player.GetPlayerName(target);
if (amount > 0 && amount <= 5000)
{
player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ ${amount} gegeben.");