From 3c460aa48abbc17d5f2168c9a57aa8c6fadce443 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 22 Oct 2007 06:01:07 +0000 Subject: [PATCH] fixed a compatibility bug in AddTargetsToMenu() --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401638 --- plugins/adminmenu.sp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/adminmenu.sp b/plugins/adminmenu.sp index 57d6a35bc..9d21bc843 100644 --- a/plugins/adminmenu.sp +++ b/plugins/adminmenu.sp @@ -171,7 +171,14 @@ public __GetAdminTopMenu(Handle:plugin, numParams) public __AddTargetsToMenu(Handle:plugin, numParams) { - return UTIL_AddTargetsToMenu(GetNativeCell(1), GetNativeCell(2), GetNativeCell(3), GetNativeCell(4)); + new bool:alive_only = false; + + if (numParams >= 4) + { + alive_only = GetNativeCell(4); + } + + return UTIL_AddTargetsToMenu(GetNativeCell(1), GetNativeCell(2), GetNativeCell(3), alive_only); } public Action:Command_DisplayMenu(client, args)