Raised This Month: $51 Target: $400
 12% 

Signal PM System - MySQL/SQLite based in-game Private Messaging


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Scone
Senior Member
Join Date: Apr 2010
Location: England
Plugin ID:
1603
Plugin Version:
1.4.2
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows players, admins and plugins to send private messages to each other in game.
    Old 04-11-2010 , 03:20   Signal PM System - MySQL/SQLite based in-game Private Messaging
    Reply With Quote #1

    Signal PM System - In-game Private Messaging

    Allows users to send private messages to each other. Messages can be sent between servers, and to players who are currently offline.

    A Quick Guide

    Type "pm" in chat to open the main menu. From here you can access your inbox, outbox, friends list, block list, group list, and a help menu. Alternatively, use the shortcuts "pminbox", "pmoutbox", "pmfriends", "pmblocks", "pmgroups" and "pmhelp" in chat. You can bind a key to open the main menu using: "bind <key> pm".

    To add someone to your friends list, either use the friends menu to add someone who is in game now, or use the "pmaddfriend" command, followed by the player's SteamID, to add someone who has connected previously but is offline at the moment.

    To send a message, type "pmsend" in chat, followed by your message. Your friends list will appear and you can choose a recipient. To reply to the last message you read, just type "pmreply" in chat, followed by your message.

    It's easy to block a user, and you can delete all the messages you've ever received from someone with a single action.

    If you are unable to use chat triggers, just prepend a slash to all your commands (for example, "/pminbox").

    How to Install

    Make sure your MySQL/SQLite database is set up correctly with SourceMod. By default, Signal will use the "default" configuation. See this link for more info:

    http://wiki.alliedmods.net/SQL_Admins_(SourceMod)

    When this is done, copy the file 'signal.smx' into your 'sourcemod/plugins/' folder, and the contents of the 'translations.zip' file into your 'sourcemod' folder. You need both the plugin and the translations for Signal to work. When Signal starts, it will automatically set up the required tables. No further configuration is required.

    You can change the database and table names Signal uses with the cvars provided.

    Note that, as SQLite databases can only be used with one server at a time, MySQL is required if you wish to send messages between multiple servers. If you only have one server, SQLite is fine.

    Features

    - Inbox and Outbox
    - Friends list and block list
    - View which friends are online right now
    - Notification when a message is received
    - Quick reply function
    - User created groups, fixed server groups
    - API to send PMs from other SM plugins
    - MySQL backend - link with your website
    - New in v1.3.0 - SQLite support
    - Flood protection
    - Highly robust, will queue messages in the event of DB failure
    - Threaded design, meaning no lag
    - Built in help system
    - Automatically add a set of SteamIDs (or groups) to all users' friends lists
    - Translation support

    Screenshots

    The friends list:


    The user menu:


    The message view:


    The help menu:



    Potential Uses

    - Let players contact admins, and vice versa
    - Let server owners communicate with all admins at once, using groups
    - Let players communicate with others who are offline
    - Help clan members organise a match
    - Let players/admins communicate between different servers in a group
    - Integrate with a MySQL enabled website (for example, a clan ladder)
    - Integrate with other plugins

    Cvars

    signalpm_table: The MySQL/SQLite table name that Signal will use (default: "signal")
    signalpm_database: The SourceMod database configuration to use (default: "default")
    signalpm_floodlimit_onemin: The number of messages a user can send every minute (default: 5)
    signalpm_pollinterval: The number of seconds to wait between checks for new messages (lower limit: 12)
    signalpm_notifytype: Where to display the new message notification. 0 for chat (default), 1 for hint text.

    Auto-Add Friends

    It is possible to add one or more contacts (for example, the server owners) to the friends list of every user by default. Simply add a record to the friends table, with your chosen name and ID in the "friendName" and "friendId" fields, but fill in the "userId" field with "all". Users cannot block or delete these contacts.

    If you don't want to manually update the database, two (console only) commands have been added as of version 1.2.1 - "pmaddserverfriend" and "pmdeleteserverfriend". You need root admin to perform these commands, and the player you are adding must have connected to a server at any point after the 1.2.1 update.

    Groups

    You can send messages to multiple players at once using groups. For full instructions, see the in-game help ('pmhelp' in chat). To make a group appear to all users (for example, 'Admins'), create it as normal, then set the owner ID in the database (signal_groups) to "all".

    Link with Other Plugins

    The "signal.inc" file provided in the attachments will allow you to send PMs from your own plugins. Add it to your scripting/includes folder, and use this code as an example:

    PHP Code:
    #include <sourcemod>
    #include <signal>
    #pragma semicolon 1

    new bool:g_signalEnabled false;

    public 
    OnAllPluginsLoaded() {
        
    g_signalEnabled LibraryExists("signal");
    }

    public 
    OnLibraryAdded(const String:name[]) {
        if(
    StrEqual(name"signal")) g_signalEnabled true;
    }

    public 
    OnLibraryRemoved(const String:name[]) {
        if(
    StrEqual(name"signal")) g_signalEnabled false;
    }

    PMSample() {
        if(
    g_signalEnabled)
            
    // Your name, your ID, recipient's SteamID, message
            
    SendPrivateMessage("Sample Plugin""#server.sample""STEAM_0:0:1337""Why hello there!");

    Technical Problems

    It's likely that any problem you get with Signal will be because your database is misconfigured. Check you've entered the username/password correctly in the databases.cfg file, and make sure Signal has the correct database permissions (Select, Insert, Update, Delete, Create Table and Alter Table).

    Also, make sure you have uploaded the contents of the translations zip file to the correct folder.

    If you do run into any problems, PM me directly and I'll respond as soon as I can.

    Compatibility

    Obviously this plugin is only compatible with mods that support radio menus. For example, it works with CS:S, TF2 and L4D[2], but not HL2DM.

    Translations
    Translations provided by:
    - DeaD_EyE82 (German)
    - Ph03n1X (Russian)
    - Richard Helgeby (Norwegian)
    - Prince03 (Italian)
    - tejeskifly (Hungarian)
    New phrases were added in v1.2.0 and v1.2.1, so some translations may be incomplete. In this case, some phrases will appear in English until each translation is updated.

    Finally

    The plugin is under active development, and I'd welcome any feature requests that you might have.
    Attached Files
    File Type: inc signal.inc (727 Bytes, 791 views)
    File Type: zip translations.zip (15.6 KB, 810 views)
    File Type: sp Get Plugin or Get Source (signal.sp - 1973 views - 91.1 KB)

    Last edited by Scone; 12-22-2011 at 16:54. Reason: Updated to 1.4.2
    Scone is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 23:45.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode