Catching "reconnect" command.
How would I go about doing this? Please, don't ask me why, it's a secret that will be reveled soon ;).
|
Re: Catching "reconnect" command.
register_clcmd("reconnect", "haha")
|
Re: Catching "reconnect" command.
PHP Code:
|
Re: Catching "reconnect" command.
I don't think the "reconnect" and "retry" commands can be hooked via register_clcmd( ).
You should try saving player data when the player disconnects. Then, then a player connects, check to see if the player's data was saved. If the player hasn't connected after X minutes from disconnecting, remove the saved data. |
Re: Catching "reconnect" command.
Yes, they aren't send to the server. I believe the best way would be checking if connected player is the one that left previously.
|
Re: Catching "reconnect" command.
Also, you can check the method viewing the code of plugins like No retry, No reconnect, etc...
|
Re: Catching "reconnect" command.
|
Re: Catching "reconnect" command.
This one does it better:
http://forums.alliedmods.net/showthread.php?t=101937 EDIT: I decided to write up an example of one that is like the link provided above, but also has support for removing the data after X minutes since the player left. Code:
|
Re: Catching "reconnect" command.
That's a decent size script for such a small idea.
|
| All times are GMT -4. The time now is 15:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.