AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [ H3LP ] Remvoe Player Connect Message (https://forums.alliedmods.net/showthread.php?t=298668)

DarthMan 06-19-2017 15:21

[ H3LP ] Remvoe Player Connect Message
 
Hello. So I want to remove the message Playername has joined the game, since I made my own script that shows when someone connects and also plays a sound on player connect/disconnect. Is it possible to block it using orpheu or ... ? Thanks !

wickedd 06-19-2017 15:24

Re: [ H3LP ] Remvoe Player Connect Message
 
What game are you talking about? Can you post a picture of the message?

EFFx 06-19-2017 15:24

Re: [ H3LP ] Remvoe Player Connect Message
 
If you made a plugin that shows the message and plays a sound, just remove the message?

DarthMan 06-19-2017 15:26

Re: [ H3LP ] Remvoe Player Connect Message
 
Quote:

Originally Posted by EFFx (Post 2529898)
If you made a plugin that shows the message and plays a sound, just remove the message?

No I mean, I want to disable the default connection message since I made my own and it displays 2 messages which is booring. It's for HL1 :)

EFFx 06-19-2017 15:28

Re: [ H3LP ] Remvoe Player Connect Message
 
Try that

PHP Code:

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(get_user_msgid("TextMsg") , "block_message")
}
public 
block_message() 
{
    if(
get_msg_argtype(2) == ARG_STRING
    {
        new 
szValue[64]
        
get_msg_arg_string(szValue charsmax(szValue))
        if(
containi(szValue "has joined") != -1
        {
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE



DarthMan 06-19-2017 15:31

Re: [ H3LP ] Remvoe Player Connect Message
 
Quote:

Originally Posted by EFFx (Post 2529901)
Try that

PHP Code:

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(get_user_msgid("TextMsg") , "block_message")
}
public 
block_message() 
{
    if(
get_msg_argtype(2) == ARG_STRING
    {
        new 
szValue[64]
        
get_msg_arg_string(szValue charsmax(szValue))
        if(
containi(szValue "has joined") != -1
        {
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE



Works, ty :)

SpannerSpammer 06-20-2017 01:00

Re: [ H3LP ] Remvoe Player Connect Message
 
Darthman, that code will not work for TFC since it
sends a localized string for the connect message.

This has been discussed before, see this thread:
https://forums.alliedmods.net/showthread.php?t=282768

DarthMan 06-20-2017 02:51

Re: [ H3LP ] Remvoe Player Connect Message
 
Quote:

Originally Posted by SpannerSpammer (Post 2529994)
Darthman, that code will not work for TFC since it
sends a localized string for the connect message.

This has been discussed before, see this thread:
https://forums.alliedmods.net/showthread.php?t=282768

I see, that explains y it works on HL/GC but not on TFC, I guess.


All times are GMT -4. The time now is 22:49.

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