Hello,
yes i was successfull. You have to hook the VGUI-Menu call, then you can filter the scores and prevent it to come up.
PHP Code:
HookUserMessage(GetUserMessageId("VGUIMenu"),Hook_VGUIMenu,true);
...
new bool:IsIntermissionCalled;
public Action:Hook_VGUIMenu(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
{
new String:s[10];
BfReadString(bf, s, sizeof(s));
// Read parameters, filter scoreboard
if(strcmp(s, "scores", false) == 0)
{
if(BfReadByte(bf) == 1 && BfReadByte(bf) == 0)
{
// We want do do this only one time...
if(!IsIntermissionCalled)
{
IsIntermissionCalled = true;
// Call intermission routine
Event_Intermission();
}
// prevent scores menu to come up
return Plugin_Handled;
}
return Plugin_Continue;
}
// Called on intermission... do what you want.
public Event_Intermission(){ ... }
If you want to show scores later, you can use that:
PHP Code:
public showScoreBoard()
{
new Handle:hScoreBoardMsg = INVALID_HANDLE;
new players[MaxClients];
new k;
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsFakeClient(i))
{
players[k++] = i;
}
}
hScoreBoardMsg = StartMessage("VGUIMenu",players,k,USERMSG_RELIABLE | USERMSG_BLOCKHOOKS);
if(hScoreBoardMsg != INVALID_HANDLE)
{
BfWriteString(hScoreBoardMsg, "scores");
BfWriteByte(hScoreBoardMsg, 1); // Show
BfWriteByte(hScoreBoardMsg, 0); // subkeys count
EndMessage();
}
else PrintToServer("[DEBUG] Invalid Msg Handle.");
}
Have fun with that...