Raised This Month: $12 Target: $400
 3% 

[HowTo] Catch Intermission.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 05-12-2007 , 18:03   [HowTo] Catch Intermission.
Reply With Quote #1

This was only tested on CS:Source

Code:
#include <sourcemod> /* Thanks to kzfi`p3tsku for this info. */ /* VGUIMenu Structure BfWriteString(bf, "scores") BfWriteByte(bf, 1) BfWriteByte(bf, 0) */ new bool:IsIntermissionCalled; new UserMsg:VGuiMenu; public OnPluginStart() {     VGuiMenu = GetUserMessageId("VGUIMenu");     HookUserMessage(VGuiMenu, _VGuiMenu); } public Action:_VGuiMenu(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init) {     if(IsIntermissionCalled)     {         return;     }     new String:Type[10];     BfReadString(bf, Type, sizeof(Type));     if(strcmp(Type, "scores", false) == 0)     {         if(BfReadByte(bf) == 1 && BfReadByte(bf) == 0)         {             IsIntermissionCalled = true;             // Intermission?             PrintToServer("Intermission");         }     } } public OnMapEnd() {     IsIntermissionCalled = false; }

I would like to thank kzfi`p3tsku for this again.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 05-12-2009 , 12:11   Re: [HowTo] Catch Intermission.
Reply With Quote #2

What is it used for? I've found that several plugins using this, but really can not find out why
altex is offline
Stitllams
Junior Member
Join Date: May 2009
Location: New Zealand
Old 05-22-2009 , 19:47   Re: [HowTo] Catch Intermission.
Reply With Quote #3

Sorry for my n00bness but is intermission between map changes, round changes or the time before a winner is announced at round end.
Stitllams is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-22-2009 , 19:51   Re: [HowTo] Catch Intermission.
Reply With Quote #4

I'm pretty sure it's the time when the scoreboard pops up at the end of a map.
bl4nk is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 05-22-2009 , 21:48   Re: [HowTo] Catch Intermission.
Reply With Quote #5

Quote:
Originally Posted by bl4nk View Post
I'm pretty sure it's the time when the scoreboard pops up at the end of a map.
Ding Ding Ding
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-26-2012 , 11:44   Re: [HowTo] Catch Intermission.
Reply With Quote #6

I know this is older than old, but I think posting an update to this isn't a bad idea The above code is great, but there may be a way that wasn't available back when this thread was written.

For one of my plugins, I needed to capture when the map ended due to a player reaching the set frag limit (say 100).

event cs_win_panel_match is what I needed.

Just thought I'd pass this along.
__________________
View my Plugins | Donate
TnTSCS is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-27-2012 , 22:30   Re: [HowTo] Catch Intermission.
Reply With Quote #7

That event wasn't available at the time of the original posting, but should work just fine.
bl4nk 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 10:38.


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