Update: v1.1.6d
The empty menu should be fixed. Please let me know if its not. (im going to bed lol just got home from work its 7am)
I made the AddPlayersToMenu a boolean stock so if there are menu items it returns true and shows the menu if false no menu is shown. and a message should be sent.
Called if you use sm_report sav or !report sav (and you are sav) from chat or console
PHP Code:
else if(iTargetList[0] == iClient && !GetConVarBool(g_Cvar_Development))
{
ReplyToCommand(iClient, "[%s] You may not report your self", g_szPrefix);
return Plugin_Handled;
}
Called if no target is specified and you want to bring a menu up to report self.
PHP Code:
else
{
/* Set up and Display the Target Menu */
decl String:szMenuTitle[32];
GetConVarString(g_Cvar_TargetMenuTitle, szMenuTitle, sizeof(szMenuTitle));
new Handle:hMenu = CreateMenu(TargetMenuHandler);
SetMenuTitle(hMenu, szMenuTitle);
SetMenuExitButton(hMenu, true);
if(AddPlayersToMenu(hMenu, iClient))
{
DisplayMenu(hMenu, iClient, MENU_TIME_FOREVER);
}
else
{
ReplyToCommand(iClient, "[%s] There are no players to report.", g_szPrefix);
CloseHandle(hMenu);
return Plugin_Handled;
}
}