Quote:
Originally Posted by blanko
I need this script: "mp3 play mp3\musica.mp3" to run once for each player everytime a new map starts(everytime the motd shows up)
|
This code might help you to catch the event
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;
}