CS_DEATHTIMEOUT V2

A deathtimeout script making users unable to harm other players.


Installation


Configuration

Config.lua

1. General Settings

  • Locale: Sets the language for the messages. Options are:

    • "EN" for English

    • "DE" for German

2. Commands

Each command defines a specific functionality. Two commands are predefined:

dtstart

  • Starts a deathtimeout for a specified player.


Functions

  • cs_deathtimeout.canStartDeathtimeout(): Set conditions to prevent the deathtimeout from appearing.

  • cs_deathtimeout.BlockedActions(playerid, playerpedid): Edit blocked actions during the deathtimeout

  • NotificationFunction(title, msg, type): The notification function used.

Notification Types

Different types of notifications available:

  • NotifyTypes: Defines types like info, error, success, warning.

Locales

Translations for different languages:

  • LocalesDeathtimeout: Contains translations for English (EN) and German (DE).

ESX Version Handling

Determines whether an old or new version of ESX is being used and initializes the shared object accordingly. If you want to, you can of course change the shared object to fit your needs.

Webhook.lua

  • The script offers 3 webhooks.

    • dtstart

    • dtclear

    • dtclearradius

If you do not want a webhook to be sent, just leave the string empty. Like this:

WebhookDt = {

    Colors = {
        ["dtstart"] = 43775,
        ["dtclear"] = 43775,
        ["dtclearradius"] = 43775,
    },

    dtstart = "",

    dtclear = "https://discord.com/api/webhooks/1333765633136918548/8sigg4zjPatDnfT8vKLCyF9fbBzr3VDCJAAdcif69pI3LJprxmDGQXQP14ckv9mjybq6",

    dtclearradius = "https://discord.com/api/webhooks/1333765633136918548/8sigg4zjPatDnfT8vKLCyF9fbBzr3VDCJAAdcif69pI3LJprxmDGQXQP14ckv9mjybq6",
}

In this example, you would not be notified when a player starts a local deathtimeout.


Example Usage


If you have any further questions, open a ticket on our discord server: discord.gg/core-services

Last updated

Was this helpful?