Raised This Month: $ Target: $400
 0% 

[REQ] "M"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 08-15-2016 , 14:26   Re: [REQ] "M"
Reply With Quote #6

Quote:
Originally Posted by blanko View Post
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;
}

Last edited by pupdebox; 08-15-2016 at 14:31.
pupdebox is offline
 



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:01.


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