mr01sam
Adds notifications, messages, caller ID and more features to phones

Supported Games
depends on

Important: This plugin requires you to have the Image Library plugin.

Features

  • HUD notifications for incoming calls
  • Enhanced phone UI, with caller history and messaging
  • Leave answering messages on failed calls
  • Image indicators for missed calls and unread messages
  • User specific preferences for customizing features

Usage

Users will need to have the phonesplus.use permission in order to see and use the features of this plugin. If permitted, interacting with a powered phone will display an enhanced UI with the following features.

  • Messages
    • On the left, a list of messages left by other players who attempted to call your phone will be displayed.
    • Unread messages will appear highlighted and will be marked as read after the first time you see them.
    • You can press CLEAR to remove all messages for that phone.
    • After attempting to call another phone that doesn't answer, you will be prompted to leave a message, this message will appear in the target phone's messaging area.
    • The number of messages a single player can leave per hour can be set in the config file.
  • History
    • On the right you will see a history of all missed, answered, or outgoing phone calls associated with this phone.
    • Unread call records are highlighted similarly to messages. They will be unhighlighted once seen.
    • You can press CLEAR to remove all call history records for this phone.
    • Records are automatically added on both ends as calls are dialed, answered, or missed.
  • Tracking
    • At the bottom you will see a button that says TRACK PHONE, if enabled, you will receive notifications for this phone.
    • When tracked, you will be notified on your HUD when you are getting an incoming call. The message will tell you who is calling and what phone they are attempting to contact you on.
    • You will also see indicators for unread answering messages and missed calls. These will disappear from your HUD once seen by anyone who has access to the phone.
    • You are able to track multiple phones at once, the indicators for messages and missed calls will show you the totals of each across all your tracked phones.
    • You can use the /phone reset tracked command to untrack yourself from all phones
    • You can also utilize the /phone reset ui command to reload your PhonesPlus ui, in case it gets stuck for whatever reason.
    • You can manually stop tracking a phone by clicking the UNTRACK button at the bottom. You will no longer receive notifications for this phone.
    • If you wish to temporarily stop getting notifications without having to untrack a phone, you can use the /phone set notifications false command to set your personal preference of receiving notifications to false. You will no longer receive incoming call notifications until you set it to true again.
    • Similarly you can disable unread message and call indicators with /phone set indicators false.

Permissions

  • phonesplus.use -- Required to use features and see UI
  • phonesplus.admin -- Grants access to admin commands

Chat Commands

  • /phone help -- Show a list of PhonesPlus commands
  • /phone set <notifications/indicators> <true/false> -- Toggle the specified UI element on or off
  • /phone reset <ui/tracked> -- Reload UI or untrack all phones that you are currently tracking
  • /phone clear <messages/history/tracked> <phonenumber> -- Clear the messages, history, or users tracking for a specified phonenumber (admin)

Developer API

object OnPhoneUse(BasePlayer player, RegisteredPhone phone)
object OnPhoneUseEnd(BasePlayer player, RegisteredPhone phone)
object OnActiveCall(BasePlayer player, RegisteredPhone phone)
object OnActiveCallEnd(BasePlayer player, RegisteredPhone phone)

Configuration

{
  "HUD Notification": {
    "Anchor min": "0.4 0.87",
    "Anchor max": "0.6 0.95",
    "Background color": "0.4 0.4 0.4"
  },
  "HUD Call Indicator": {
    "Anchor min": "0.655 0.90",
    "Anchor max": "0.675 0.95",
    "Image color": "0.5 1 0.5 0.5"
  },
  "HUD Message Indicator": {
    "Anchor min": "0.68 0.90",
    "Anchor max": "0.70 0.95",
    "Image color": "0.5 0.5 1 0.5"
  },
  "Enable incoming call notifications (true/false)": true,
  "Hourly message limit": 50
}

Localization

{
  "UI title history": "HISTORY",
  "UI title messages": "MESSAGES",
  "UI title clear": "CLEAR",
  "UI title track": "TRACK PHONE",
  "UI title untrack": "UNTRACK PHONE",
  "UI title prompt": "No answer? Leave a message:",
  "HUD incoming": "Incoming call from {0}",
  "History missed": "Missed call from {0}",
  "History outgoing": "Outgoing call to {0}",
  "History answered": "Answered call from {0}",
  "Time minutes": "{0} minutes ago",
  "Time hours": "{0} hours ago",
  "Time days": "{0} days ago",
  "Usage": "Usage: {0}",
  "Notifications on": "You will receive incoming call notifications from tracked phones",
  "Notifications off": "You will no longer receive incoming call notifications from tracked phones",
  "Indicators on": "Indicators will be displayed on the HUD for tracked phones",
  "Indicators off": "Indicators will no longer be displayed on the HUD for tracked phones",
  "No permission": "You do not have permission to use that command",
  "Tracking on": "Now tracking phone {0}",
  "Tracking off": "Stopped tracking phone {0}",
  "Reset ui": "Reset UI",
  "Reset tracked": "Reset tracked phone records",
  "No messages": "No recent messages",
  "No history": "No recent calls",
  "Clear history": "Cleared history for {0}",
  "Clear trackers": "Cleared trackers for {0}",
  "Clear messages": "Cleared messages for {0}"
}

Donate

I make plugins for free, but donating keeps me motivated and is a great way to show appreciation if you use this plugin a lot. Totally optional, but if you're interested you can buy me a coffee with this link.

Credits

  • Lauren, the artist who made the icons for this plugin.
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.