Hi all,
i have a plugin (
SM-Quiz) that uses a Panel to show Questions to dead players.
Now i have the Problem, that these Panel stays open when a new round starts.
I have tried to close the panel that way:
PHP Code:
HookEvent("round_end",closePanels,EventHookMode_PostNoCopy);
...
public closePanels(Handle: event, const String: name[], bool: dontBroadcast)
{
new Handle:hEmptyPanel = INVALID_HANDLE;
hEmptyPanel = CreatePanel();
SetPanelTitle(hEmptyPanel, " ");
for(new i = 1; i <= GetMaxClients(); i++)
{
// check if client is valid and could have a panel displayed
if(hasClientPanel(i))
{
// Send empty panel that closes after 1 sec
SendPanelToClient(hEmptyPanel, i, Handler_QuizPanel, 1);
}
}
CloseHandle(hEmptyPanel);
}
Unfortunately that does only work sometimes. Any idea how to do that?