Remotely closing the connection for a player
#1

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...
Reply
#2

Natively, it's not possible.
Reply
#3

But is it possible? And how could I do it? Using RPCS / raknet functions?
Reply
#4

Quote:
Originally Posted by Puppy
Посмотреть сообщение
But is it possible? And how could I do it? Using RPCS / raknet functions?
It would be possible if you "memory hack" the sa-mp server network layer(raknet)
Reply
#5

Ask Kurta999
Reply
#6

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.
Reply
#7

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.
Reply
#8

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.
Reply
#9

So is this, or is it not something we can control using network functions?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)