AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hook MOTD game event, final message not 'hooked' (https://forums.alliedmods.net/showthread.php?t=239159)

HLM 04-22-2014 21:47

hook MOTD game event, final message not 'hooked'
 
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

Arkshine 04-23-2014 02:39

Re: hook MOTD game event, final message not 'hooked'
 
When first argument is 0.


All times are GMT -4. The time now is 08:40.

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