From 3f764ca9de48761ac20e7a25cbe997da9a045c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brostr=C3=B6m=2EA=20=7C=20Evul?= Date: Sun, 28 Apr 2024 21:47:12 +0000 Subject: [PATCH] Added predefined cav respawn templates (#234) * Added predefined cav respawn templates * Fixed string --- addons/respawn/$PBOPREFIX$ | 1 + addons/respawn/CfgRespawnTemplates.hpp | 18 ++++++++++++++++++ addons/respawn/config.cpp | 20 ++++++++++++++++++++ addons/respawn/script_component.hpp | 5 +++++ addons/respawn/stringtable.xml | 10 ++++++++++ 5 files changed, 54 insertions(+) create mode 100644 addons/respawn/$PBOPREFIX$ create mode 100644 addons/respawn/CfgRespawnTemplates.hpp create mode 100644 addons/respawn/config.cpp create mode 100644 addons/respawn/script_component.hpp create mode 100644 addons/respawn/stringtable.xml diff --git a/addons/respawn/$PBOPREFIX$ b/addons/respawn/$PBOPREFIX$ new file mode 100644 index 00000000..6284585e --- /dev/null +++ b/addons/respawn/$PBOPREFIX$ @@ -0,0 +1 @@ +z\cav\addons\respawn \ No newline at end of file diff --git a/addons/respawn/CfgRespawnTemplates.hpp b/addons/respawn/CfgRespawnTemplates.hpp new file mode 100644 index 00000000..c12bc3cc --- /dev/null +++ b/addons/respawn/CfgRespawnTemplates.hpp @@ -0,0 +1,18 @@ +class CfgRespawnTemplates { + class cav_respawn { + displayName = CSTRING(cav_respawn); + onPlayerKilled = "BIS_fnc_respawnMenuPosition"; + onPlayerRespawn = "BIS_fnc_respawnMenuPosition"; + respawn = "BASE"; + respawnDelay = 4; + respawnTypes[] = {2,3}; + respawnOnStart = -1; + }; + class cav_onelife { + displayName = CSTRING(cav_onelife); + onPlayerKilled = "BIS_fnc_respawnSpectator"; + onPlayerRespawn = "BIS_fnc_respawnSpectator"; + respawnOnStart = 30000; + respawnTypes[] = {1,2,3}; + }; +}; diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp new file mode 100644 index 00000000..9b6695d7 --- /dev/null +++ b/addons/respawn/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "cav_main", + "cav_common" + }; + author = ECSTRING(Main,ModTeam); + authors[] = {"Brostrom.A (Evul)"}; + url = ECSTRING(Main,Url); + VERSION_CONFIG; + }; +}; + +#include "CfgRespawnTemplates.hpp" diff --git a/addons/respawn/script_component.hpp b/addons/respawn/script_component.hpp new file mode 100644 index 00000000..c456c170 --- /dev/null +++ b/addons/respawn/script_component.hpp @@ -0,0 +1,5 @@ +#define COMPONENT respawn +#define COMPONENT_BEAUTIFIED Respawn + +#include "\z\cav\addons\main\script_mod.hpp" +#include "\z\cav\addons\main\script_macros.hpp" diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml new file mode 100644 index 00000000..ac4b9dfb --- /dev/null +++ b/addons/respawn/stringtable.xml @@ -0,0 +1,10 @@ + + + + Respawn Operation + + + One Life Operation + + + \ No newline at end of file