Posts: 580
Threads: 26
Joined: Jan 2006
Reputation:
0
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.
Posts: 2,431
Threads: 86
Joined: Nov 2009
Reputation:
0
Have you tested this to make sure? Or are you assuming it will work? 0.0
Posts: 3,304
Threads: 58
Joined: Sep 2008
Reputation:
0
Looks nice, another "glitch". If I were still scripting, I'd use it hehe.
Posts: 149
Threads: 0
Joined: Oct 2009
Reputation:
0
Wauw thanks a lot for showing us this. I tried making a command to force players to reconnect. And i may say i had some problems, first transfering the ip in a timer. But i got that fixed. And then had to find the time until it should unban you. But now it works.
Posts: 256
Threads: 23
Joined: Dec 2009
Reputation:
0
Tested in my server, worked perfectly!
Posts: 1,959
Threads: 40
Joined: Nov 2009
Reputation:
0
Very nice, I'm sure I'll use it.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Nice one, I'll try to make use of this later.
Posts: 435
Threads: 15
Joined: Feb 2008
Reputation:
0
Nice, I have a bit of an off topic question (could kinda be on topic) but I read in another thread that you have a way to detect the half connected bug. My question is are you simply just checking the time between player updates and if its over a certain time you know they missed some updates/timed out and are therefore in a desync'ed state? Just kinda curious because using your reconnect method with the half connected detection would be really really nice and very useful.
Posts: 207
Threads: 33
Joined: Feb 2007
Reputation:
0
not trying to be mean or selfish, but how is this listed as a Tutorial?
more like how to idea, not really tutorial, just saying...
Posts: 580
Threads: 26
Joined: Jan 2006
Reputation:
0
You don't have to use reloadbans if you use rcon unbanip ingame.
reloadbans is only needed to reload samp.ban file if you changed it externally.
Posts: 133
Threads: 5
Joined: Jul 2010
Reputation:
0
Why to unban and all that shit, simply make command fakeban or fban and then in code just kick the player but add the message You have been banned from this server
Posts: 2,726
Threads: 85
Joined: Jul 2010
Reputation:
0
Thank you. Lovely.
EDIT: How do I unban an IP in RCON?