Raised This Month: $ Target: $400
 0% 

Display MOTD at end of map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-13-2013 , 06:13   Display MOTD at end of map
Reply With Quote #1

i want to display a motd at the end of a map during the mp_chattime..

to display whatever...

which forward do i need to hook ?
Blizzard_87 is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-13-2013 , 06:16   Re: Display MOTD at end of map
Reply With Quote #2

register_event("30", "eMapChange", "a")
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-13-2013 , 06:44   Re: Display MOTD at end of map
Reply With Quote #3

Quote:
Originally Posted by Kard1nal View Post
register_event("30", "eMapChange", "a")
doesnt work.
Blizzard_87 is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 03-13-2013 , 06:48   Re: Display MOTD at end of map
Reply With Quote #4

Post your code.
__________________
Sorry for my English, I'm Russian.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-13-2013 , 06:52   Re: Display MOTD at end of map
Reply With Quote #5

PHP Code:
public eMapChange()
{
    new 
sBuffer[MAX_BUFF_LEN], iLenszName[32], szMapName[32];

    new 
iMaxPlayers get_maxplayers( );
    new 
iFragsiPlayeriCurTop = -999;

    for( new 
1<= iMaxPlayersi++ )
    {
        if( 
is_user_connected) )
        {
            
iFrags RoundKills[i];
            if( 
iFrags iCurTop )
            {
                
iPlayer i,
                
iCurTop iFrags;
            }
        }
    } 
// iPlayer is 'leading' with iCurTop frags.    
    
    
get_user_name(iPlayerszName31)
    
get_mapname(szMapName31);
    
    
iLen formatex(sBuffercharsmax(sBuffer), "<html><body bgcolor='black' text='white'>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<center>")
    
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br><br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<font size='6'><b>%s</b></font>"szMapName)
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"<br>")
    

    
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen"</center>")
    
    
    
show_motd(0sBuffer"Map Winner!")
    
    return 
PLUGIN_HANDLED

this doesnt get called at end of map... just the scoreboard
Blizzard_87 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-13-2013 , 07:04   Re: Display MOTD at end of map
Reply With Quote #6

Intermission is called when the map timer runs out, not when the map is changed by an admin.
hornet is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-13-2013 , 07:18   Re: Display MOTD at end of map
Reply With Quote #7

Quote:
Originally Posted by hornet View Post
Intermission is called when the map timer runs out, not when the map is changed by an admin.
so how do i disable the scoreboard and show my motd? during chattime?
Blizzard_87 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-13-2013 , 07:36   Re: Display MOTD at end of map
Reply With Quote #8

Like this:

Code:
public eMapChange() {     message_begin( MSG_ALL, SVC_FINALE );     write_string( "" );     message_end();             show_motd( 0, "some text", "some title" ); }

EDIT: I'm not exactly sure if there's a way to hook admin map change simply ... Still trying.

Last edited by hornet; 03-13-2013 at 07:38.
hornet is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-13-2013 , 07:43   Re: Display MOTD at end of map
Reply With Quote #9

Quote:
Originally Posted by hornet View Post
Like this:

Code:
public eMapChange() {     message_begin( MSG_ALL, SVC_FINALE );     write_string( "" );     message_end();             show_motd( 0, "some text", "some title" ); }

EDIT: I'm not exactly sure if there's a way to hook admin map change simply ... Still trying.
thanks! seems to be working fine

EDIT: its all good... just want it to show at normal end map event.

Last edited by Blizzard_87; 03-13-2013 at 07:44.
Blizzard_87 is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-13-2013 , 22:18   Re: Display MOTD at end of map
Reply With Quote #10

Quote:
Originally Posted by hornet View Post
Like this:

Code:
public eMapChange() {     message_begin( MSG_ALL, SVC_FINALE );     write_string( "" );     message_end();             show_motd( 0, "some text", "some title" ); }

EDIT: I'm not exactly sure if there's a way to hook admin map change simply ... Still trying.
What does exactly the sending of the SVC_FINALE message?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply



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 21:44.


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