Posts: 129
Threads: 24
Joined: Dec 2014
Reputation:
0
Hello.
I am working on a plug-in, and wish to know if I can somehow remotely close the connection on a player without giving the "Server closed the connection" message.
Something kind of like this
native Kick_(playerid);
Which would kick them from the server, without showing any server closed the connection messages(and preferably no "%s left the server" messages...
Posts: 987
Threads: 21
Joined: Nov 2012
Reputation:
0
Natively, it's not possible.
Posts: 129
Threads: 24
Joined: Dec 2014
Reputation:
0
But is it possible? And how could I do it? Using RPCS / raknet functions?
Posts: 2,203
Threads: 154
Joined: Oct 2009
Reputation:
0
Impossible, that message is not sent from server, its a message client prints when connection is terminated (Not lost). To remove that message you have to modify samp client.
Posts: 2,368
Threads: 27
Joined: Jun 2010
Reputation:
0
Why not simply clear the chat window? And about the "%s left the server messages." aren't this possible to remove from OnPlayerDisconnect()? I don't see the point in making such plugin.
Posts: 129
Threads: 24
Joined: Dec 2014
Reputation:
0
Clearing the chat is not efficient, and is not my intent. The only thing I can think of to do this in PAWN is storing EVERY client message sent to each player(last 20), how-ever this would be greatly inefficient.
Posts: 129
Threads: 24
Joined: Dec 2014
Reputation:
0
So is this, or is it not something we can control using network functions?
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
The client writes that message. This isnt anything the server could control, not even with special packets to the client.
If you want to quietly remove or suspend a player from the game, unsync him using OnPlayerUpdate.
And creating a kick-native that does not call OnPlayerDisconnect would be against the meaning of OnPlayerDisconnect. This would cause more problems than it would solve. Simply setting a flag would be absolutely fine to prevent sending the "left the server" message.