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

Disable welcome MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 03-21-2008 , 04:25   Disable welcome MOTD
Reply With Quote #1

Hi...

PHP Code:
#include <amxmodx>

public plugin_init()
    
set_msg_block(get_user_msgid("MOTD"),BLOCK_SET
This is good way to block welcome motd?

Last edited by Sn!ff3r; 03-21-2008 at 04:30.
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-21-2008 , 04:49   Re: Disable welcome MOTD
Reply With Quote #2

That will block all MOTD's. Make a plugin that delete the motd.txt from cstrike dir when map starts...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-21-2008 , 04:59   Re: Disable welcome MOTD
Reply With Quote #3

Code:
#include <amxmodx> #define MOTD_FLAG_ARG 1 #define MOTD_FLAG_END 1 new bool:g_bSawMotd[33]; public plugin_init() {     register_plugin("Block First MOTD", "0.1", "Exolent");     register_message(get_user_msgid("MOTD"), "message_MOTD"); } public client_connect(id) {     g_bSawMotd[id] = false; } public message_MOTD(msgid, dest, id) {     if(!g_bSawMotd[id])     {         if(get_msg_arg_int(MOTD_FLAG_ARG) == MOTD_FLAG_END)         {             g_bSawMotd[id] = true;         }         return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 03-21-2008 , 05:48   Re: Disable welcome MOTD
Reply With Quote #4

Alka - false ;] ex. /top15 work fine.

X-olent hmm...
Quote:
Large MOTD is sent in multiple messages.
;)
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-21-2008 , 06:31   Re: Disable welcome MOTD
Reply With Quote #5

Quote:
Originally Posted by Sn!ff3r View Post
Hi...

PHP Code:
#include <amxmodx>

public plugin_init()
    
set_msg_block(get_user_msgid("MOTD"),BLOCK_SET
This is good way to block welcome motd?
Should work, why didn't you test it ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-21-2008 , 17:07   Re: Disable welcome MOTD
Reply With Quote #6

Quote:
Originally Posted by Sn!ff3r View Post
hmm...
Quote:
Large MOTD is sent in multiple messages.
;)
yeah, but if you read the HL1 Documentation for the Events, the first argument is set to 1 when the end of the motd is reached, and 0 otherwise.

so mine should work.
kthx.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 03-22-2008 , 12:29   Re: Disable welcome MOTD
Reply With Quote #7

connorr i already tested this, but i want to find better way

X-olent sorry, my bad...

Karma for all
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-25-2008 , 20:17   Re: Disable welcome MOTD
Reply With Quote #8

I see that X-olent is using boolean.
The question is why should I use
PHP Code:
new bool:g_bTest
 
public Test()
{
        
g_bTest true
 
        
if (g_bTest)
                
g_bTest false

instead of
PHP Code:
new g_Test
 
public Test()
{
        
g_Test true // Or 1
 
        
if (g_Test)
                
g_Test false // Or 0

?
__________________

Last edited by hleV; 07-25-2008 at 20:20. Reason: Editing...
hleV is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-25-2008 , 22:55   Re: Disable welcome MOTD
Reply With Quote #9

It's more practical.
Also, the boolean can only be true or false, whereas an integer has infinite possibilities.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-26-2008 , 11:13   Re: Disable welcome MOTD
Reply With Quote #10

So if I only want to use true or false, I should use boolean?
__________________
hleV 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 00:07.


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