Raised This Month: $7 Target: $400
 1% 

hook MOTD game event, final message not 'hooked'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 04-22-2014 , 21:47   hook MOTD game event, final message not 'hooked'
Reply With Quote #1

Hello, I am hooking the event "MOTD" and that is working well as it fires whenever the MOTD is displayed, I have it set to display in my console, all is fine and dandy, except when the message that would indicate the end of the MOTD is sent, I do not see it in my console.

here is my test code.
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Motd Test""0.0.1""Master");
    
    
register_event("MOTD""Hook_Motd""b");
}

public 
Hook_Motd(id)
{
    new 
amount read_datanum();
    new 
data1data2data3[61];
    
data1 read_data(0);
    
data2 read_data(1);
    
read_data(2data360);
    
//client_print(0, print_chat, "%d datas on player %d", amount, id);
    
client_print(0print_console"1:%d 2:%d 3:%s"data1data2data3);

My ultimate goal is to hook the sending of motd.txt up to the final message (when flag is set to 1, presumed data2) and after all those messages are blocked, begin sending the dynamically created motd which is pulled from a socket connection edited to include user details such as name steamid ip etc.

The problem: I cannot find out how to 'get' the final motd event
__________________
+|- KARMA Respectively

HLM is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-23-2014 , 02:39   Re: hook MOTD game event, final message not 'hooked'
Reply With Quote #2

When first argument is 0.
__________________
Arkshine 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 07:54.


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