Core-Services
DiscordShop
  • 🏠HOME
  • ⚙️SCRIPTS
    • CS_MENU_DEFAULT
    • CS_VISA
    • CS_SHOPS
    • CS_GARAGE
    • CS_REVIVESTATION
    • CS_PANICBUTTON V2
    • CS_DEATHTIMEOUT V2
    • CS_VEHICLERENTAL
      • Installation
      • Configuration
        • config.lua
        • devConfig.lua
        • framework.lua
        • webhook.lua
      • Exports
Powered by GitBook
On this page
  • Installation
  • Configuration
  • Config.lua
  • Webhook.lua
  • Support

Was this helpful?

  1. SCRIPTS

CS_REVIVESTATION

A revivestation script, which includes pricing based on death reasons and usage restrictions based on job roles and licenses.

PreviousCS_GARAGENextCS_PANICBUTTON V2

Last updated 7 months ago

Was this helpful?


Installation


Configuration

Config.lua

This configuration file sets up various parameters for the revivestations in your game, defining everything from positions to costs and restrictions.

General Settings

  • Locale: Specifies the language used. Current setting: EN (English).

  • reviveButtonBaseWidth: Adjusts the width of the revive button if needed. Default: 3.5.

Station Positions

This section defines the settings for individual revive stations.

  • Position: Coordinates of the revive station.

    • Example: vector3(299.6456, -582.2020, 44.260)

  • spawnPed: Determines whether an NPC should be spawned at the station.

    • true means an NPC will be spawned.

  • pedModel: The model of the NPC.

    • Example: "s_m_m_doctor_01"

  • pedPosition: The position and orientation of the NPC.

    • Example: vector4(299.9435, -582.4766, 43.2600, 86.2430)

Station-Specific Settings

These settings control various aspects of the revive station's functionality.

  • maxDeadPlayerDistance: Maximum distance a dead player can be from the station to be revived.

    • Example: 10.0

  • onlyForJob: Restricts access to players with specific jobs.

    • Example: false (means no restriction).

    • Can also be a list like:

      onlyForJob = {
          police = {minrank = 5},
          ambulance = {minrank = 1},
      }
      • The left value is the job name and the minrank value defines the minimum grade a player needs to have in the job.

  • onlyWithLicense: Requires players to have a specific license to use the station.

    • Example: "weapon"

  • maxMedics: Limits the number of medics on the server to allow usage.

    • Example: 2

  • medicJobs: Specifies which jobs count as medics.

    • Example: {"ambulance", "police"}

  • price: Base price for revival.

    • Example: 50

  • feeForEachMedic: Additional fee per medic on duty.

    • Example: 500

  • account: Determines the account used for payment.

    • Example: "money"

Death Reason Prices

Specific prices for different causes of death.

  • deathReasonPrices: Table of specific prices based on death causes.

    • Example: ["Fire"] = 600, ["Pistol"] = 150

Custom Marker and Blip

Settings for customizing the visual markers and blips on the map.

  • Marker: Custom marker settings.

    • type: Marker type. Example: 21

    • distance: Distance to draw the marker. Example: 10

    • bobUpAndDown: Whether the marker bobs up and down. Example: false

    • faceCamera: Whether the marker faces the camera. Example: false

    • rotate: Whether the marker rotates. Example: true

    • scale: Size of the marker. Example: vector3(0.5, 0.5, 0.5)

    • rgba: Color and transparency of the marker.

      • Example: {r = 26, g = 150, b = 207, a = 140}

  • blip: Custom blip settings.

    • label: Label for the blip. Example: "Revivestation"

    • sprite: Icon for the blip. Example: 153

    • color: Color of the blip. Example: 18

    • scale: Size of the blip. Example: 0.7

General Marker and Blip

Default settings used if no custom marker or blip is defined for a specific station.

  • GeneralMarker: Default marker settings.

  • GeneralBlip: Default blip settings.

Functions

Various functions used within the script:

  • Revive(serverId): Server function to revive a player.

  • afterRevive(playerPedId): Client function triggered after a player is revived.

  • ShowUI(): Client function triggered when the UI is displayed.

  • HideUI(): Client function triggered when the UI is hidden.

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

  • HelpNotification(msg): The helpnotification function used.

Notification Types

Different types of notifications available:

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

Locales

Translations for different languages:

  • LocalesRevivestation: 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.

Make sure to change the Notification function to your notify trigger!

Or else the script will not work properly.

Webhook.lua

  • The script offers 1 webhook.

    • Main

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

WebhookRevivestation = {

    Colors = {
        ["Main"] = 43775,
    },

    Main = "",
}

In this example, you would not be notified when a player is revived.


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

⚙️
Get the script
Watch the preview
Support