07.08.2017, 15:11
Hi,
SetTimer( "AntiReconnect", 15000, true );
This is accurate? if player is not using hacks, when he spawn onplayerspawn allways get called?
new Spawned[ MAX_PLAYERS ];
OnPlayerSpawn
Spawned[ playerid ] = true;
SetTimer( "AntiReconnect", 15000, true );
Код:
forward AntiReconnect( ); public AntiReconnect( ) { foreach(Player, playerid) { new State = GetPlayerState( playerid ); if( State == 1 || State == 2 || State == 3 || State == 8 ) { if( !Spawned[ playerid ] ) { printf ( "Player [ ID: %i ] kicked for reconnect.", playerid ); Kick ( playerid ); } } } }
new Spawned[ MAX_PLAYERS ];
OnPlayerSpawn
Spawned[ playerid ] = true;