diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index 566314c9..c6616165 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -155,7 +155,7 @@ export default function factionInteraction(globalData: IGlobalData) { mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket2", (ticketPrice) => { globalData.InMenu = true; - var input = new InputHelper("Um welches Vergehen handelt es sich ?", globalData); + var input = new InputHelper("Um welches Vergehen handelt es sich?", globalData); mp.gui.cursor.show(true, true); input.show(); input.getValue(ticketReason => { diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 2a953e97..8ae07a2e 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -593,8 +593,6 @@ namespace ReallifeGamemode.Server.Managers string playername = NAPI.Player.GetPlayerName(player); string targetname = NAPI.Player.GetPlayerName(target); - List nearPlayers = NAPI.Player.GetPlayersInRadiusOfPlayer(10, player); - if (target == null || !target.IsLoggedIn()) { ChatService.PlayerNotFound(player); @@ -604,25 +602,20 @@ namespace ReallifeGamemode.Server.Managers { player.SendNotification("~r~Du kannst dir selbst kein Ticket geben!"); } - else if (!nearPlayers.Contains(target)) - { - player.SendNotification("~r~Der Spieler ist nicht in deiner Nähe!"); - } else { - if (amount > 0 && amount <= 10000) - { - player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~{amount.ToMoneyString()} ~w~ausgestellt (Grund: ~g~{reason}~w~)."); - target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ein Ticket in Höhe von ~y~{amount.ToMoneyString()} ~w~ausgestellt.", true); - target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Das Ticket kann im Interaktionsmenü angenommen werden.", true); - target.SetData("ticket_boolean", true); - target.SetData("ticket_amount", amount); - target.SetData("ticket_player", player); - } - else + if (amount <= 0 || amount > 10000) { player.SendNotification("~r~Du kannst nur einen Betrag zwischen $1 und $10.000 angeben!"); + return; } + + player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~{amount.ToMoneyString()} ~w~ausgestellt (Grund: ~g~{reason}~w~)."); + target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ein Ticket in Höhe von ~y~{amount.ToMoneyString()} ~w~ausgestellt.", true); + target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Das Ticket kann im Interaktionsmenü angenommen werden.", true); + target.SetData("ticket_boolean", true); + target.SetData("ticket_amount", amount); + target.SetData("ticket_player", player); } }