From 68fde95904e255ba4db13ab53a61637db0d60c58 Mon Sep 17 00:00:00 2001 From: qaate47 Date: Wed, 24 Jul 2024 19:16:58 +0200 Subject: [PATCH] release part 3 --- README.md | 12 ++++++++++- demo/metadata.json | 11 ++++++++-- demo/zm_demo.gsc | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 demo/zm_demo.gsc diff --git a/README.md b/README.md index 0c875ce..8f243e9 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,14 @@ YouTube link : https://youtu.be/-eEuGDKdN5I ### Part 2 Release : https://github.com/ate47/demo_mods/releases/tag/ep2 -YouTube link : https://youtu.be/a1PYKZ9h4Y0 \ No newline at end of file +YouTube link : https://youtu.be/a1PYKZ9h4Y0 + +### Part 3 + +Release : https://github.com/ate47/demo_mods/releases/tag/ep3 +YouTube link : https://youtu.be/OmvfBsqDUGE + +### Part 4 + +Release : https://github.com/ate47/demo_mods/releases/tag/ep4 +YouTube link : https://youtu.be/xXbxS5MVCPE diff --git a/demo/metadata.json b/demo/metadata.json index 44597e6..f466b4e 100644 --- a/demo/metadata.json +++ b/demo/metadata.json @@ -8,8 +8,15 @@ "hooks": [ "scripts/mp_common/bb.gsc" ] + }, + { + "type": "scriptparsetree", + "name": "scripts/atian_mods/zm_demo.gsc", + "path": "zm_demo.gscc", + "hooks": [ + "scripts/zm_common/load.gsc" + ] } ], - "cache": [ - ] + "cache": [] } \ No newline at end of file diff --git a/demo/zm_demo.gsc b/demo/zm_demo.gsc new file mode 100644 index 0000000..ad07a16 --- /dev/null +++ b/demo/zm_demo.gsc @@ -0,0 +1,53 @@ +#using scripts\core_common\values_shared; +#using scripts\core_common\system_shared; +#using scripts\core_common\callbacks_shared; +#using scripts\core_common\util_shared; +#using scripts\core_common\array_shared; +#using scripts\core_common\clientfield_shared; + +#namespace zm_demo; + + +function autoexec __init__system__() { + system::register("zm_demo", &__init__, &__main__); +} + +function __init__() { + callback::on_spawned(&on_player_spawned); +} + +function __main__() { + +} + +function on_player_spawned() { + level endon(#"end_game", #"game_ended"); + self endon(#"disconnect", #"spawned_player"); + + wait 1; + + self val::set(#"zm_demo_lazy", "ignoreme", true); + + while (true) { + self.score = 42000; + + // https://github.com/ate47/t8-atian-menu/blob/master/scripts/core_common/key_mgr.gsc#L146 + + if (self meleebuttonpressed()) { + self iprintlnbold("Melee !"); + + //self takeweapon(self getcurrentweapon()); + weapon = getweapon(#"ar_accurate_t8"); // ICR-7 + self giveweapon(weapon); + self switchtoweapon(weapon); + + do { + waitframe(1); + } while (self meleebuttonpressed()); + } + + waitframe(1); + } + +} +