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

[REQ] Custom message plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A Happy Horsie
New Member
Join Date: May 2015
Old 05-02-2015 , 13:53   [REQ] Custom message plugin
Reply With Quote #1

Hei, I'd like a plugin the allows any player to send messages to other players like /message. I realise this is incredibly stupid but a lot of people are requesting it, basically like a whisper system for people. I couldn't find one, only advertisement plugins. Thanks in advance!
A Happy Horsie is offline
Chokitu
Senior Member
Join Date: Oct 2013
Old 05-02-2015 , 17:51   Re: [REQ] Custom message plugin
Reply With Quote #2

Add me in skype chokitu3
Chokitu is offline
Send a message via Skype™ to Chokitu
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 05-04-2015 , 04:54   Re: [REQ] Custom message plugin
Reply With Quote #3

Don't pay anything for something that simple :
PHP Code:
#include <sourcemod>

#define PLUGIN_TAG "{slateblue}[Whisper]{default}"

public Plugin:myinfo =
{
    
name        "[ANY] Whisper",
    
author      "Arkarr",
    
description "Create a very simple whisper system",
    
version     "0.1",
    
url         "www.sourcmeod.net"
};

public 
OnPluginStart()
{
    
RegConsoleCmd("sm_whisper"CMD_Whisper"Send a private message to a specified player");
RegConsoleCmd("sm_message"CMD_Whisper"Send a private message to a specified player");
    
LoadTranslations("common.phrases");
}

public 
Action:CMD_Whisper(clientargs)
{
    if(
args != 2)
    {
        
CPrintToChat(client"%s Usage : sm_whisper [PLAYER] [MESSAGE]"PLUGIN_TAG);
        return 
Plugin_Handled;
    }

    
char player[45];
    
char message[255];
    
    
GetCmdArg(1playersizeof(player));
    
GetCmdArg(2messagesizeof(message));
    
    
int target FindTarget(clientplayertruefalse);
    
    if(
target == -1)
    {
        
CPrintToChat(client"%s {fullred}[ERROR]{default} A error happened, look below messagefor more informations."PLUGIN_TAG);
        return 
Plugin_Handled;
    }
    
    
    
CPrintToChat(target"%s {fullred}You got a message from %N{default} :"PLUGIN_TAGclient);    
    
CPrintToChat(targetmessage);    
    
CPrintToChat(client"%s {lawngreen}Message sent !"PLUGIN_TAG);
    
    return 
Plugin_Handled;

You will need More Colors to compille it.
__________________
Want to check my plugins ?

Last edited by Arkarr; 05-04-2015 at 04:56.
Arkarr is offline
Reply



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 16:06.


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