Example #1
0
        public static void Run(SvPlayer player, string message)
        {
            var tpaUser = PlayerList[player.player.ID].TpaUser;

            if (tpaUser == null || !IsOnline.Run(tpaUser))
            {
                player.SendChatMessage($"<color={errorColor}>There are no TPA accepts. (User could've went offline.)</color>");
                return;
            }
            PlayerList[player.player.ID].TpaUser = null;
            player.SendChatMessage($"<color={errorColor}>You denied the TPA request of</color> <color={argColor}>{tpaUser.username}</color><color={errorColor}>.</color>");
            tpaUser.svPlayer.SendChatMessage($"<color={argColor}>{player.player.username}</color> <color={errorColor}>Denied your TPA request.</color>");
        }
Example #2
0
        public static void Run(SvPlayer player, string message)
        {
            var tpaUser = PlayerList[player.player.ID].TpaUser;

            if (tpaUser == null || !IsOnline.Run(tpaUser))
            {
                player.SendChatMessage($"<color={errorColor}>There are no TPA accepts. (User could've went offline.)</color>");
                return;
            }
            tpaUser.svPlayer.ResetAndSavePosition(player.player.GetPosition(), player.player.GetRotation(), player.player.GetPlaceIndex());
            PlayerList[player.player.ID].TpaUser = null;
            player.SendChatMessage($"<color={infoColor}>You accepted the TPA request of</color> <color={argColor}>{tpaUser.username}</color><color={infoColor}>.</color>");
            tpaUser.svPlayer.SendChatMessage($"<color={argColor}>{player.player.username}</color> <color={infoColor}>Accepted your TPA request.</color>");
        }
Example #3
0
        public static void Run(SvPlayer player, string message)
        {
            var replyUser = PlayerList[player.player.ID].ReplyToUser;

            if (replyUser == null || !IsOnline.Run(replyUser))
            {
                player.SendChatMessage($"<color={errorColor}>There is nobody to respond to. (User could've went offline.)</color>");
                return;
            }
            string arg1 = GetArgument.Run(1, false, true, message);

            if (string.IsNullOrEmpty(arg1))
            {
                player.SendChatMessage(ArgRequired);
                return;
            }
            PlayerList[replyUser.ID].ReplyToUser = player.player;
            player.SendChatMessage($"<color={infoColor}>[PM]</color> <color={argColor}>{replyUser.username}</color> <color={warningColor}>></color> <color={infoColor}>{arg1}</color>");
            replyUser.svPlayer.SendChatMessage($"<color={infoColor}>[PM]</color> <color={argColor}>{player.player.username}</color> <color={warningColor}><</color> <color={infoColor}>{arg1}</color>");
        }