I think I created a global variable for each class if it was over a certain number, then in ServerPlayerChangeClass put if global.(etc) = false exit; but it never worked.
edit:
Ok, here's what I think I had.
ini_open("classLimits.ini");
if player.team == TEAM_RED && (instance_number(ScoutRed)>ini_read_real("ClassLimits", "ScoutLimit", "99"))
{
global.scoutsOver=true;
}
ini_close();
{
class = CLASS_SCOUT;
event_user(1);
}
for each individual class selection event in the ClassSelectController.
Then in ServerPlayerChangeClass
if global.scoutsOver or global.etcOver exit;
{
writebyte(PLAYER_CHANGECLASS, argument2);
writebyte(argument0, argument2);
writebyte(argument1, argument2);
}
edit again: also, global.etcOver=false; in Create.