summaryrefslogtreecommitdiff
path: root/gsctool
diff options
context:
space:
mode:
authorDylan Muller <dylan.muller@corigine.com>2023-09-16 12:34:28 +0200
committerDylan Muller <dylan.muller@corigine.com>2023-09-17 19:34:45 +0200
commitd9454c1ef1b140c21e096de80a98ce0b3e811681 (patch)
tree6a7a9963d7bf5898b1858c6feb7410da8aeef24b /gsctool
downloadgsctool-d9454c1ef1b140c21e096de80a98ce0b3e811681.tar.gz
gsctool-d9454c1ef1b140c21e096de80a98ce0b3e811681.zip
gsctool: core: initial commit
Initial commit of gsctool. A utility to inject custom GSC scripts for Call of Duty Black Ops 1 (PC).
Diffstat (limited to 'gsctool')
-rw-r--r--gsctool/config.ini3
-rw-r--r--gsctool/spawn_raygun/main.gsc31
2 files changed, 34 insertions, 0 deletions
diff --git a/gsctool/config.ini b/gsctool/config.ini
new file mode 100644
index 0000000..b29db9c
--- /dev/null
+++ b/gsctool/config.ini
@@ -0,0 +1,3 @@
+mod.dir=spawn_raygun
+mod.entry=main.gsc
+
diff --git a/gsctool/spawn_raygun/main.gsc b/gsctool/spawn_raygun/main.gsc
new file mode 100644
index 0000000..b1fef79
--- /dev/null
+++ b/gsctool/spawn_raygun/main.gsc
@@ -0,0 +1,31 @@
+#include maps\_utility;
+#include common_scripts\utility;
+#include maps\_hud_util;
+
+main()
+{
+ level thread onPlayerConnect();
+}
+
+onPlayerConnect()
+{
+ for(;;)
+ {
+ level waittill("connected", player);
+ player thread onPlayerSpawned();
+ }
+}
+
+onPlayerSpawned()
+{
+ self endon("disconnect");
+ for(;;)
+ {
+ self waittill("spawned_player");
+ self iprintln("Spawned raygun!");
+ self GiveWeapon("ray_gun_zm");
+ self SetWeaponAmmoStock("ray_gun_zm", 1000);
+ self SwitchToWeapon("ray_gun_zm");
+
+ }
+}