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

Welcome Player Message [Any?]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
RaT3D
Junior Member
Join Date: Jan 2014
Plugin ID:
4037
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A simple plugin, which welcomes a player to your server with a custom message.
    Old 01-08-2014 , 13:01   Welcome Player Message [Any?]
    Reply With Quote #1

    Welcome Player Message 1.0

    Description:
    WPM is a simple Sourcemod plugin, which allow you to add a custom join message to welcome the player to your server.

    Cvars:
    • sm_wpm_version - Shows WPM plugin version.
    • sm_wpm "1" - Enables / Disables the plugin. 1 = Enable, 0 = Disable.
    • sm_wpm_message "Welcome To Example Server!" - Set the welcome message for your server.
    Change Log:
    Quote:
    Release 1.0
    Please tell me if my plugin works with other Steam games, like TF2, L4D or any other! I have only tested this on my CSS server!
    Attached Files
    File Type: sp Get Plugin or Get Source (wpm.sp - 2394 views - 1.3 KB)

    Last edited by RaT3D; 01-08-2014 at 13:05.
    RaT3D is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 01-08-2014 , 14:02   Re: Welcome Player Message [Any?]
    Reply With Quote #2

    There already exists plugins like this.
    https://forums.alliedmods.net/showthread.php?p=1734571
    https://forums.alliedmods.net/showthread.php?p=1184461
    https://forums.alliedmods.net/showthread.php?p=880791
    __________________
    DoPe^ is offline
    RaT3D
    Junior Member
    Join Date: Jan 2014
    Old 01-08-2014 , 14:09   Re: Welcome Player Message [Any?]
    Reply With Quote #3

    There might do, but this is my first plugin... and almost everything is created now, but there is not many plugins with the same source code? So mine is "different".

    But thanks for telling me, I didn't know about those plugins
    RaT3D is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 01-08-2014 , 14:11   Re: Welcome Player Message [Any?]
    Reply With Quote #4

    Quote:
    Originally Posted by RaT3D View Post
    There might do, but this is my first plugin... and almost everything is created now, but there is not many plugins with the same source code? So mine is "different".

    But thanks for telling me, I didn't know about those plugins
    Well sure the code might not be the same but it still duplicates already existing plugins.
    Which means it will get unapproved, unless you add something that the other plugins dosnt have.
    __________________
    DoPe^ is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 01-08-2014 , 15:52   Re: Welcome Player Message [Any?]
    Reply With Quote #5

    You're looping through all clients for no reason. If you want the message to print to all players and not just the client then you should use PrintToChatAll instead. Duplicate functionality exists in other plugins if not more functionality but there's a tip if you're getting started.

    Last edited by Drixevel; 01-08-2014 at 15:53.
    Drixevel is offline
    Nefarius
    Member
    Join Date: Sep 2010
    Old 01-08-2014 , 17:22   Re: Welcome Player Message [Any?]
    Reply With Quote #6

    Greetings.

    If you're just getting started scripting you may have a look at my very first plugin. I never published it 'cause it's more like a demo and strings are hard-coded but it may demonstrate the use of colors, timers and a few client API calls.

    BTW if I remember correctly there still is an error condition if players leave the server so don't take the code too serious
    Attached Files
    File Type: sp Get Plugin or Get Source (welcomeplayer.sp - 942 views - 3.0 KB)

    Last edited by Nefarius; 01-08-2014 at 17:23.
    Nefarius is offline
    RaT3D
    Junior Member
    Join Date: Jan 2014
    Old 01-11-2014 , 09:02   Re: Welcome Player Message [Any?]
    Reply With Quote #7

    Quote:
    Originally Posted by r3dw3r3w0lf View Post
    You're looping through all clients for no reason. If you want the message to print to all players and not just the client then you should use PrintToChatAll instead. Duplicate functionality exists in other plugins if not more functionality but there's a tip if you're getting started.
    I only want to welcome the client who joins the game, not have it say welcome everytime a client joins...
    RaT3D is offline
    joesch
    New Member
    Join Date: Jan 2014
    Old 01-13-2014 , 23:22   Re: Welcome Player Message [Any?]
    Reply With Quote #8

    I would like to see a plugin that allows to write a personally welcome text if a friend (recognized by id or a name) join the server? does something already exist????

    Last edited by joesch; 01-13-2014 at 23:24.
    joesch is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 05-16-2014 , 05:18   Re: Welcome Player Message [Any?]
    Reply With Quote #9

    Quote:
    Originally Posted by RaT3D View Post
    I only want to welcome the client who joins the game, not have it say welcome everytime a client joins...
    It won't if you just have it print to that specific client when the call is executed.

    Code:
    #include <sourcemod>
    
    #define PLUGIN_VERSION	"1.0"
    
    new Handle:h_Enable = INVALID_HANDLE;
    new Handle:h_Message = INVALID_HANDLE;
    
    public Plugin:myinfo = 
    {
    	name = "Welcome Player Message // WPM",
    	author = "RaT3D - Martin J.Berthelsen",
    	description = "A simple plugin, which welcomes a player to your server with a custom message.",
    	version = PLUGIN_VERSION,
    	url = "http://royalgaming.net23.net"
    }
    
    public OnPluginStart()
    {
    	CreateConVar("sm_wpm_version", PLUGIN_VERSION, "WPM plugin version" , FCVAR_NOTIFY|FCVAR_DONTRECORD);
    	h_Enable = CreateConVar("sm_wpm", "1", "Enables WPM plugin when client join server. 1 = Enabled, 0 = Disabled.", FCVAR_NOTIFY);
    	h_Message = CreateConVar("sm_wpm_message", "NONE", "Set a message for client join.", FCVAR_NOTIFY);
    	AutoExecConfig(true, "wpmConfig");
    }
    
    public OnClientPutInServer(client)
    {
    	if(GetConVarInt(h_Enable) == 1)
    	{
    		new String:SMsg[99];
    		GetConVarString(h_Message, SMsg, sizeof (SMsg));
    		
    		if(StrEqual(SMsg, "NONE") || StrEqual(SMsg, ""))
    		{
    			PrintToServer("[WPM] Join message not found!")
    		}
    		else
    		{
    			PrintToChat(client, "\x04[WPM]\x03 %s", SMsg)
    		}
    	}
    }
    Drixevel is offline
    exstream
    Member
    Join Date: Feb 2013
    Old 04-07-2018 , 17:02   Re: Welcome Player Message [Any?]
    Reply With Quote #10

    just made some change's to make better for insurgency
    Attached Files
    File Type: smx welcomeplayer.smx (7.8 KB, 424 views)
    File Type: sp Get Plugin or Get Source (welcomeplayer.sp - 471 views - 2.8 KB)
    exstream 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 12:26.


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