ticket spieler muss in der nähe sein
This commit is contained in:
@@ -447,6 +447,9 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
|
Player target = PlayerService.GetPlayerByNameOrId(nameOrId);
|
||||||
string playername = NAPI.Player.GetPlayerName(player);
|
string playername = NAPI.Player.GetPlayerName(player);
|
||||||
string targetname = NAPI.Player.GetPlayerName(target);
|
string targetname = NAPI.Player.GetPlayerName(target);
|
||||||
|
|
||||||
|
List<Player> nearPlayers = NAPI.Player.GetPlayersInRadiusOfPlayer(10, player);
|
||||||
|
|
||||||
if (target == null || !target.IsLoggedIn())
|
if (target == null || !target.IsLoggedIn())
|
||||||
{
|
{
|
||||||
ChatService.PlayerNotFound(player);
|
ChatService.PlayerNotFound(player);
|
||||||
@@ -456,6 +459,10 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
{
|
{
|
||||||
player.SendNotification("~r~Du kannst dir selbst kein Ticket geben!");
|
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
|
else
|
||||||
{
|
{
|
||||||
if (amount > 0 && amount <= 10000)
|
if (amount > 0 && amount <= 10000)
|
||||||
|
|||||||
Reference in New Issue
Block a user