Tickets nun serverweit ausstellbar
This commit is contained in:
@@ -593,8 +593,6 @@ namespace ReallifeGamemode.Server.Managers
|
||||
string playername = NAPI.Player.GetPlayerName(player);
|
||||
string targetname = NAPI.Player.GetPlayerName(target);
|
||||
|
||||
List<Player> nearPlayers = NAPI.Player.GetPlayersInRadiusOfPlayer(10, player);
|
||||
|
||||
if (target == null || !target.IsLoggedIn())
|
||||
{
|
||||
ChatService.PlayerNotFound(player);
|
||||
@@ -604,14 +602,14 @@ 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)
|
||||
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);
|
||||
@@ -619,11 +617,6 @@ namespace ReallifeGamemode.Server.Managers
|
||||
target.SetData<int>("ticket_amount", amount);
|
||||
target.SetData<Player>("ticket_player", player);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendNotification("~r~Du kannst nur einen Betrag zwischen $1 und $10.000 angeben!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[RemoteEvent("CLIENT:InteractionMenu_LSPD_Points3")]
|
||||
|
||||
Reference in New Issue
Block a user