22.09.2010, 21:01
This is fairly simple thing to achieve, so i did not include code.
Basically, sometimes you want a player to reconnect - say if a player pauses and you wish to kick him & have him reconnect when he returns, or for various other reasons, so this is how it works:
1. In code, rcon ban the ip, but DON'T KICK the player
2. The player will timeout, in onplayerdisconnect unban the ip that was banned for him - remember that getplayerip doesnt work in onplayerdisconnect, so store the value elsewhere.
3. Player's client will lose connection and attempt to auto-reconnect afterwards.
Basically, sometimes you want a player to reconnect - say if a player pauses and you wish to kick him & have him reconnect when he returns, or for various other reasons, so this is how it works:
1. In code, rcon ban the ip, but DON'T KICK the player
2. The player will timeout, in onplayerdisconnect unban the ip that was banned for him - remember that getplayerip doesnt work in onplayerdisconnect, so store the value elsewhere.
3. Player's client will lose connection and attempt to auto-reconnect afterwards.