From d9454c1ef1b140c21e096de80a98ce0b3e811681 Mon Sep 17 00:00:00 2001 From: Dylan Muller Date: Sat, 16 Sep 2023 12:34:28 +0200 Subject: gsctool: core: initial commit Initial commit of gsctool. A utility to inject custom GSC scripts for Call of Duty Black Ops 1 (PC). --- gsctool/spawn_raygun/main.gsc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gsctool/spawn_raygun/main.gsc (limited to 'gsctool/spawn_raygun') 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"); + + } +} -- cgit v1.2.3-70-g09d2