View Single Post
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