with other solutions, you have to be running the: #include <cstrike>
what i like about
switch_teams.sma is that it only requires: #include <amxmodx>
it doesn't always work on the first attempt, but if you wait another round or two, scroll up on your con and re-enter the command, it will usually take the second time around. nice if you like to keep your server running trim.
Note: be sure to use #include <amxmod
X> instead of the <amxmod>