You will need to obtain the character ID for the character you want to force into a PvP cape state. You can use the following query to get the character ID from the database.
SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name'
Stored Procedure: _Char_ForcePvPState
Parameters:
@CharID INT- Target character ID@PvPState TINYINT- PvP cape type
1 = Red cape
2 = Black cape
3 = Blue cape
4 = White cape
5 = Yellow cape
Let us first test whether the command works by using the following code, which will force a specific character into PvP state.
USE [vPlus] GO DECLARE @CharID INT = (SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name') EXEC _Char_ForcePvPState @CharID, 3;
For real usage, use @CharID directly from your calling procedure.
EXEC _Char_ForcePvPState @CharID, 3;