Cookies


Vsroplus only uses the cookies it needs to keep you signed in and remember your language. No ads, no tracking.

Got it

Need to learn more? Privacy policy

Our guides are in English for now.

Kill

By completing this guide, you should be able to trigger Capture The Flag event kill and build your own custom systems.

Stored Procedure: _OnCaptureTheFlagKill
Parameters:

@CharID INT - Killer character ID
@CharName16 VARCHAR(64) - Killer character name
@DeadCharID INT - Dead character ID
@DeadCharName16 VARCHAR(64) - Dead character name

Let's send a text notification to the killer character using _Char_SendTextNotification to ensure that the trigger works fine for us.

USE [vPlus]
GO

/****** Object: StoredProcedure [dbo].[_OnCaptureTheFlagKill] ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      <Author,,Name>
-- ALTER date:  <ALTER Date,,>
-- Description: <Description,,>
-- =============================================

ALTER PROCEDURE [dbo].[_OnCaptureTheFlagKill]
    @CharID INT,
    @CharName16 VARCHAR(64),
    @DeadCharID INT,
    @DeadCharName16 VARCHAR(64)
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed when a character kills another
        character in the Capture The Flag event.

        @CharID represents the killer character ID.
        @CharName16 represents the killer character name.
        @DeadCharID represents the dead character ID.
        @DeadCharName16 represents the dead character name.
    */

    --------- Your code starts here --------

    EXEC _Char_SendTextNotification @CharID, 'You killed a player in the Capture The Flag event', 1, 0, 0;
END

Last updated: 2 April, 2024

An error has occurred. This application may no longer respond until reloaded. Reload 🗙