WOW!!! It's official, I'm a n00b. I can't make heads or tails of the extensive coding you've done.
It seems this would be allot of work, but I think it's well worth it.
You'd need to hook the round_start event and do the score check and restricting then. I don't understand all the Trie stuff, but could be used to store the data I think.
You'd need the sm_restrict_winning for an if statement in round_start, then somthing like new CT_Rounds_Won = GetTeamScore(3) and new T_Rounds_Won = GetTeamScore(2) then do CT - T and T - CT to determine who's winning. Then you'd have to get the original values of the cvars, so that when you do sm_restrict on a weapon/team, you could reset the previous restrictions once the winning team is no longer pwning so badly.
I think you probably get my idea, without me typing bad syntax any further. Here's a link to the description of how Mani worked: http://www.mani-admin-plugin.com/ind...d=30&Itemid=25
Maybe to reset things, you could just read the config file again. Then if a team is winning, you might be able to simply check for isweaponrestricted for each weapon in the list for that team and set them to sm_restrict 0, I dunno, I'm just rambling, so going to bed, please reply.