From 3615e717ca7e1047481f5ebcd1c372f17ed40295 Mon Sep 17 00:00:00 2001 From: HttrckCldHKS Date: Sat, 18 Oct 2014 10:10:58 -0700 Subject: [PATCH] Adding New Game Modifications Due Colored Menus Adding New Game Modifications Due Colored Menus. --- plugins/include/amxmisc.inc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/plugins/include/amxmisc.inc b/plugins/include/amxmisc.inc index ccd7a511..0d97062a 100755 --- a/plugins/include/amxmisc.inc +++ b/plugins/include/amxmisc.inc @@ -420,12 +420,22 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad } } -stock colored_menus() +stock colored_menus() { - new mod_name[32]; - get_modname(mod_name,31); + static const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + static const ModsCount = sizeof(ModNames); - return ( equal(mod_name,"cstrike") || equal(mod_name,"czero") || equal(mod_name,"dod") ); + static ModName[32], Iterator = 0; + + get_modname(ModName, 31); + + for (Iterator = 0; Iterator < ModsCount; Iterator++) + { + if (equal(ModName, ModNames[Iterator])) + return 1; + } + + return 0; } stock cstrike_running()