You will need to obtain the account ID that you want to disconnect. You can use the following query to get the account ID from the database.
SELECT JID FROM _OnlinePlayers WHERE CharName16 = 'character_name'
Stored Procedure: _Account_Disconnect
Parameters:
@UserJID INT- Target account ID@Message VARCHAR(255)- Reason for disconnection
Let us first test whether the command works by using the following code, which will disconnect the specified account.
USE [vPlus] GO DECLARE @UserJID INT = (SELECT JID FROM _OnlinePlayers WHERE CharName16 = 'character_name') EXEC _Account_Disconnect @UserJID, 'You have been disconnected by the server';
For real usage, use @UserJID directly from your calling procedure.
EXEC _Account_Disconnect @UserJID, 'You have been disconnected by the server';