summaryrefslogtreecommitdiff
path: root/gsctool/spawn_raygun
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/spawn_raygun
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/spawn_raygun')
-rw-r--r--gsctool/spawn_raygun/main.gsc31
1 files changed, 31 insertions, 0 deletions
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");
+
+ }
+}