mirror of
https://github.com/ineedbots/t6_bot_warfare.git
synced 2025-04-22 09:35:44 +00:00
allocation fix
This commit is contained in:
parent
0b06eca14a
commit
52139cd0e9
BIN
raw/scripts/mp/max_allocation_fix_source-compiled.gsc
Normal file
BIN
raw/scripts/mp/max_allocation_fix_source-compiled.gsc
Normal file
Binary file not shown.
33
raw/scripts/mp/max_allocation_fix_source.gsc
Normal file
33
raw/scripts/mp/max_allocation_fix_source.gsc
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user