1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 07:08:06 -05:00
Files
BO2-Reimagined/scripts/zm/replaced/zm_tomb_craftables.gsc

51 lines
1.3 KiB
Plaintext

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
quadrotor_control_thread()
{
self endon( "bled_out" );
self endon( "disconnect" );
while ( 1 )
{
if ( self actionslottwobuttonpressed() && self hasweapon( "equip_dieseldrone_zm" ) )
{
prev_wep = self getCurrentWeapon();
self waittill( "weapon_change_complete" );
self playsound( "veh_qrdrone_takeoff" );
if(self hasweapon(prev_wep) && prev_wep != "equip_dieseldrone_zm")
{
self switchtoweapon( prev_wep );
}
else
{
self switchtoweapon( self getweaponslistprimaries()[0] );
}
self waittill( "weapon_change_complete" );
if ( self hasweapon( "equip_dieseldrone_zm" ) )
{
self takeweapon( "equip_dieseldrone_zm" );
self setactionslot( 2, "" );
}
str_vehicle = "heli_quadrotor_zm";
if ( flag( "ee_maxis_drone_retrieved" ) )
{
str_vehicle = "heli_quadrotor_upgraded_zm";
}
qr = spawnvehicle( "veh_t6_dlc_zm_quadrotor", "quadrotor_ai", str_vehicle, self.origin + vectorScale( ( 0, 0, 1 ), 96 ), self.angles );
level thread maps/mp/zm_tomb_craftables::quadrotor_death_watcher( qr );
qr thread maps/mp/zm_tomb_craftables::quadrotor_instance_watcher( self );
return;
}
wait 0.05;
}
}