diff --git a/raw/scripts/mp/max_allocation_fix_source-compiled.gsc b/raw/scripts/mp/max_allocation_fix_source-compiled.gsc new file mode 100644 index 0000000..9a69d07 Binary files /dev/null and b/raw/scripts/mp/max_allocation_fix_source-compiled.gsc differ diff --git a/raw/scripts/mp/max_allocation_fix_source.gsc b/raw/scripts/mp/max_allocation_fix_source.gsc new file mode 100644 index 0000000..96e4d03 --- /dev/null +++ b/raw/scripts/mp/max_allocation_fix_source.gsc @@ -0,0 +1,33 @@ +init() +{ + level thread on_player_connect(); +} + +on_player_connect() +{ + while ( true ) + { + level waittill( "connected", player ); + + if ( !player istestclient() ) + player thread check_player_classes(); + } +} + +check_player_classes() +{ + for ( class_num = 0; class_num < 10; class_num++ ) + { + allocationSpent = self GetLoadoutAllocation( class_num ); + logline1 = self.name + " XUID: " + self getXUID() + " maxAllowed: " + level.maxAllocation + " current: " + allocationSpent; + print( logline1 ); + + if ( allocationSpent > level.maxAllocation ) + { + logline1 = "Player: " + self.name + " XUID: " + self getXUID() + " had too many items in their class."; + print( logline1 ); + kick( self getEntityNumber() ); + break; + } + } +} \ No newline at end of file