Raised This Month: $ Target: $400
 0% 

[REQ] Display top15 instead of motd


Post New Thread Reply   
 
Thread Tools Display Modes
JusTGo
Veteran Member
Join Date: Mar 2013
Old 03-11-2018 , 14:11   Re: [REQ] Display top15 instead of motd
Reply With Quote #11

Quote:
Originally Posted by GoldNux View Post
What do you think about what JusTGo said?
I just dont want my server to crash or something.

Thank you!
he edited his post and fixed it by adding is_user_connected before showing the motd so it should work with no problems.
__________________
JusTGo is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 03-12-2018 , 08:43   Re: [REQ] Display top15 instead of motd
Reply With Quote #12

Quote:
Originally Posted by JusTGo View Post
he edited his post and fixed it by adding is_user_connected before showing the motd so it should work with no problems.
Nice! Is there a way to hide the chat message?
The chat gets flooded with /top15 when playes join.

Not so important but maybe its easy to fix?
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731
GoldNux is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 03-12-2018 , 09:11   Re: [REQ] Display top15 instead of motd
Reply With Quote #13

Add in plugins.ini after all plugins using / commands that you want to be hidden in chat.

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin"ChatCmdBlocker""0.1""LegacyCode" )

    
register_clcmd"say""handleBlockCmdOutput" )
    
register_clcmd"say_team""handleBlockCmdOutput" )
}

public 
handleBlockCmdOutputid )
{
    new const 
a_ChatCommands[][] =
    {
        
"thetime",
        
"/rank",
        
"/top15",
        
"/hp",
        
"/nextmap",
        
"/timeleft"
    
}

    new 
s_Message[192], s_ChatCmd[16]
    
read_argss_Messagecharsmaxs_Message ) )
    
remove_quotess_Message )
    
trims_Message )

    if ( !
s_Message[0] || !is_user_connectedid ) )
        return 
PLUGIN_HANDLED

    copyc
s_ChatCmdcharsmaxs_ChatCmd ), s_Message' ' )

    for ( new 
isizeof a_ChatCommandsi++ )
    {
        if ( 
equalis_ChatCmda_ChatCommands[i] ) )
            return 
PLUGIN_HANDLED
    
}

    return 
PLUGIN_CONTINUE

Plus add them into .sma take care after last command not to type on end , like "/top15", - just type "/top15".
sanimare is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 03-12-2018 , 09:22   Re: [REQ] Display top15 instead of motd
Reply With Quote #14

Quote:
Originally Posted by sanimare View Post
Add in plugins.ini after all plugins using / commands that you want to be hidden in chat.

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin"ChatCmdBlocker""0.1""LegacyCode" )

    
register_clcmd"say""handleBlockCmdOutput" )
    
register_clcmd"say_team""handleBlockCmdOutput" )
}

public 
handleBlockCmdOutputid )
{
    new const 
a_ChatCommands[][] =
    {
        
"thetime",
        
"/rank",
        
"/top15",
        
"/hp",
        
"/nextmap",
        
"/timeleft"
    
}

    new 
s_Message[192], s_ChatCmd[16]
    
read_argss_Messagecharsmaxs_Message ) )
    
remove_quotess_Message )
    
trims_Message )

    if ( !
s_Message[0] || !is_user_connectedid ) )
        return 
PLUGIN_HANDLED

    copyc
s_ChatCmdcharsmaxs_ChatCmd ), s_Message' ' )

    for ( new 
isizeof a_ChatCommandsi++ )
    {
        if ( 
equalis_ChatCmda_ChatCommands[i] ) )
            return 
PLUGIN_HANDLED
    
}

    return 
PLUGIN_CONTINUE

Plus add them into .sma take care after last command not to type on end , like "/top15", - just type "/top15".
Thank you my friend!
__________________
Try my version of de_dust2, I think it's great and you should check it out!
https://gamebanana.com/mods/83731

Last edited by GoldNux; 03-12-2018 at 09:24.
GoldNux 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 22:44.


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