View Single Post
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 10-26-2010 , 15:31   Re: Signal PM System - MySQL/SQLite based in-game Private Messaging
Reply With Quote #86

Quote:
Originally Posted by FF|Skyrider View Post
pmusend username message? Then automatic adds the person in the friend list? (saying pmusend with the u standing for user)
I'll consider adding a feature like that in the future - unfortunately I'm very busy at the moment (just started Uni).

Quote:
Originally Posted by FF|Skyrider View Post
I only see the inbox of the message I send to myself in 1 server, which is the one I send the original message from.
This could be a problem with your SourceMod database configuration - there's nothing special about which server a message was sent from, they all get put in the same table. Double check that all the servers are definitely accessing the same tables of the same database. If the config is okay, try testing it again (in case you accidentally deleted the message before switching servers or something ). Also make sure you have a look at the consoles of the other servers, there could be DB-related error messages.

Quote:
Originally Posted by FF|Skyrider View Post
Any way there can be a welcome message to all new members?
It should be possible to do this as an external plugin - set up a table to keep track of who's been sent a message (or set a SM cookie), and use the SendPrivateMessage function (as shown in the OP) to message them if they aren't already listed.

For example, try the following (totally untested) code. You need to compile it with signal.inc in the right place, and make sure you set SourceMod to store client cookies in the MySQL database:

PHP Code:
#include <sourcemod>
#include <clientprefs>
#include <signal>

new Handle:g_alreadySent;

public 
OnPluginStart() 
{
    
g_alreadySent RegClientCookie("welcomeSent""Has welcome message already been sent?"CookieAccess_Private);
}

public 
OnClientCookiesCached(client)
{
    
decl String:buf[5];
    
GetClientCookie(clientg_alreadySentbufsizeof(buf));

    if(!
StrEqual(buf"yes")) {
        
decl String:authid[32];
        
GetClientAuthString(clientauthidsizeof(authid));
        
SendPrivateMessage("Greeter""#server.greeter"authid"Welcome to the server!");
        
SetClientCookie(clientg_alreadySent"yes");
    }

__________________
Scone is offline