From 5d2b738ec1a916ba7d7862946d157fc5d1ed8a63 Mon Sep 17 00:00:00 2001 From: HttrckCldHKS Date: Sat, 18 Oct 2014 10:36:07 -0700 Subject: [PATCH] Improving Code --- plugins/include/amxmisc.inc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/include/amxmisc.inc b/plugins/include/amxmisc.inc index 0d97062a..9f91c6bb 100755 --- a/plugins/include/amxmisc.inc +++ b/plugins/include/amxmisc.inc @@ -422,14 +422,12 @@ stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___Ad stock colored_menus() { - static const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; - static const ModsCount = sizeof(ModNames); + new const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + new ModName[32]; - static ModName[32], Iterator = 0; + get_modname(ModName, charsmax(ModName)); - get_modname(ModName, 31); - - for (Iterator = 0; Iterator < ModsCount; Iterator++) + for (new Iterator = 0; Iterator < sizeof(ModNames); Iterator++) { if (equal(ModName, ModNames[Iterator])) return 1;