Raised This Month: $ Target: $400
 0% 

MOTD Wont Show


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 01-01-2011 , 19:27   MOTD Wont Show
Reply With Quote #1

it shows an empty motd.

PHP Code:
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new const VERSION[] = "1.0";

new 
boolg_bShowMotd[33];

public 
plugin_init()
{
    
register_plugin("MOTD Test"VERSION"Shuttle_Wave");
    
    
// motd block by exolent
    
register_message(get_user_msgid("MOTD"), "message_MOTD");
    
RegisterHam(Ham_Spawn"player""fwdHamSpawn_Post"1);
}

public 
client_connect(id)
{
    
g_bShowMotd[id] = false;

    
set_task(0.1"task_ShowMotd"id);
}

public 
task_ShowMotd(id)
{
    new 
szAuthID[34];
    
get_user_authid(idszAuthID33);
    
    new 
szFormat[512];
    
formatex(szFormat511"http://gmreason.com/invite/test.php?SteamID=%s"szAuthID);
    
show_motd(idszFormat);
}
 
public 
message_MOTD(const MsgId, const MsgDest, const MsgEntity)
{
    if(!
g_bShowMotd[MsgEntity])
    {
        if(
get_msg_arg_int(1) == 1)
        {
            
g_bShowMotd[MsgEntity] = true;
            return 
PLUGIN_HANDLED;
        }        
    }
    return 
PLUGIN_CONTINUE;

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-01-2011 , 19:32   Re: MOTD Wont Show
Reply With Quote #2

Maybe because your site really does.
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-01-2011 , 19:33   Re: MOTD Wont Show
Reply With Quote #3

PHP Code:
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new const VERSION[] = "1.0";

new 
boolg_bShowMotd[33];

public 
plugin_init()
{
    
register_plugin("MOTD Test"VERSION"Shuttle_Wave");
    
    
// motd block by exolent
    
register_message(get_user_msgid("MOTD"), "message_MOTD");
    
RegisterHam(Ham_Spawn"player""fwdHamSpawn_Post"1);
}

public 
client_connect(id)
{
    
g_bShowMotd[id] = false;

    
//set_task(0.1, "task_ShowMotd", id);
}

public 
task_ShowMotd(id)
{
    new 
szAuthID[34];
    
get_user_authid(idszAuthID33);
    
    new 
szFormat[512];
    
formatex(szFormat511"http://gmreason.com/invite/test.php?SteamID=%s"szAuthID);
    
show_motd(idszFormat);
}
 
public 
message_MOTD(const MsgId, const MsgDest, const MsgEntity)
{
    if(!
g_bShowMotd[MsgEntity])
    {
        if(
get_msg_arg_int(1) == 1)
        {
            
g_bShowMotd[MsgEntity] = true;
            
set_task(0.1"task_ShowMotd"MsgEntity);
        }
        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
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 01-01-2011 , 19:38   Re: MOTD Wont Show
Reply With Quote #4

y comment out //set_task(0.1, "task_ShowMotd", id)?
make the time longer? ( 10sec )

Quote:
Originally Posted by Exolent[jNr] View Post
PHP Code:
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new const VERSION[] = "1.0";

new 
boolg_bShowMotd[33];

public 
plugin_init()
{
    
register_plugin("MOTD Test"VERSION"Shuttle_Wave");
    
    
// motd block by exolent
    
register_message(get_user_msgid("MOTD"), "message_MOTD");
    
RegisterHam(Ham_Spawn"player""fwdHamSpawn_Post"1);
}

public 
client_connect(id)
{
    
g_bShowMotd[id] = false;

    
//set_task(0.1, "task_ShowMotd", id);
}

public 
task_ShowMotd(id)
{
    new 
szAuthID[34];
    
get_user_authid(idszAuthID33);
    
    new 
szFormat[512];
    
formatex(szFormat511"http://gmreason.com/invite/test.php?SteamID=%s"szAuthID);
    
show_motd(idszFormat);
}
 
public 
message_MOTD(const MsgId, const MsgDest, const MsgEntity)
{
    if(!
g_bShowMotd[MsgEntity])
    {
        if(
get_msg_arg_int(1) == 1)
        {
            
g_bShowMotd[MsgEntity] = true;
            
set_task(0.1"task_ShowMotd"MsgEntity);
        }
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-01-2011 , 19:40   Re: MOTD Wont Show
Reply With Quote #5

1st, client is not in the server client_connect().
2nd, it would be better to block the join MOTD, then show yours.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

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 02:10.


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