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.
__________________