Skip to content

Commit e22603e

Browse files
committed
AlwaysUAV update
1 parent eaf2438 commit e22603e

File tree

3 files changed

+125
-34
lines changed

3 files changed

+125
-34
lines changed

GSC/AlwaysUAV/AlwaysUAV.gsc

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
============================
3+
| Lethal Beats Team |
4+
============================
5+
|Game : IW5 |
6+
|Script : AlwaysUAV |
7+
|Creator : LastDemon99 |
8+
|Type : Addon |
9+
============================
10+
*/
11+
12+
#include common_scripts\utility;
13+
#include maps\mp\_utility;
14+
15+
init()
16+
{
17+
setDvarIfUninitialized("always_uav", 0);
18+
setDvarIfUninitialized("sweep_uav", 1);
19+
20+
if(getDvarInt("always_uav"))
21+
{
22+
replacefunc(maps\mp\perks\_perkfunctions::setPainted, ::blank);
23+
replacefunc(maps\mp\killstreaks\_remoteuav::remoteUAV_unmarkRemovedPlayer, ::blank);
24+
replacefunc(maps\mp\killstreaks\_uav::damageTracker, ::blank);
25+
replacefunc(maps\mp\killstreaks\_uav::updateUAVModelVisibility, ::updateUAVModelVisibility);
26+
replacefunc(maps\mp\killstreaks\_uav::_getRadarStrength, ::getRadarStrength);
27+
28+
level.killStreakFuncs["uav"] = ::blank;
29+
level.killStreakFuncs["uav_support"] = ::blank;
30+
level.killStreakFuncs["uav_2"] = ::blank;
31+
level.killStreakFuncs["double_uav"] = ::blank;
32+
level.killStreakFuncs["triple_uav"] = ::blank;
33+
level.killStreakFuncs["counter_uav"] = ::blank;
34+
level.killstreakFuncs["uav_strike"] = ::blank;
35+
level.killstreakSetupFuncs["uav_strike"] = ::blank;
36+
level.killstreakFuncs["directional_uav"] = ::blank;
37+
38+
if(getDvarInt("sweep_uav"))
39+
{
40+
if (getDvarInt("always_uav") == 1) uav_type = "triple_uav";
41+
else
42+
{
43+
uav_type = "directional_uav";
44+
level thread onPlayerConnect();
45+
}
46+
47+
level thread maps\mp\killstreaks\_uav::launchUAV(undefined, "axis", 99999, uav_type);
48+
level thread maps\mp\killstreaks\_uav::launchUAV(undefined, "allies", 99999, uav_type);
49+
return;
50+
}
51+
level thread onPlayerConnect();
52+
}
53+
}
54+
55+
onPlayerConnect()
56+
{
57+
level endon("game_ended");
58+
for (;;)
59+
{
60+
level waittill("connected", player);
61+
player thread onPlayerSpawn();
62+
}
63+
}
64+
65+
onPlayerSpawn()
66+
{
67+
self endon("disconnect");
68+
for(;;)
69+
{
70+
self waittill("spawned_player");
71+
if(getDvarInt("sweep_uav")) self.radarShowEnemyDirection = true;
72+
else self setPerk(getDvarInt("always_uav") == 1 ? "specialty_radarblip" : "specialty_radararrow", true, false);
73+
}
74+
}
75+
76+
getRadarStrength(team) { return 3; }
77+
updateUAVModelVisibility() { self hide(); }
78+
blank(arg1, arg2) {}

GSC/AlwaysUAV/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<p align="center">
2+
<img src="https://github.com/LastDemon99/LastDemon99/blob/main/Data/lb_logo.jpg">
3+
<br><br>
4+
<b>IW5 Always UAV</b><br>
5+
<a>Simple script to activate uav on your plutonium servers</a>
6+
<br><br>
7+
<a href="#how-to-use">How To Use</a> •
8+
<a href="#download">Download</a> •
9+
<a href="#credits">Credits</a> •
10+
<a href="#sponsor">Sponsor</a> •
11+
</p>
12+
13+
<br>
14+
15+
# <a name="how-to-use"></a>How To Use
16+
- Place the script file at "%localappdata%/plutonium/storage/iw5/scripts" if the folder does not exist, create it
17+
18+
- To configure the script you can set the following dvars in your server config or in the game console.<br>
19+
#
20+
21+
>Disable script: ```always_uav 0```
22+
23+
>Allow Point Radar: ```always_uav 1```
24+
25+
>Allow Directional Radar: ```always_uav 2```
26+
27+
>Disable Sweep Radar: ```sweep_uav 0```
28+
29+
>Allow Sweep Radar: ```sweep_uav 1```
30+
#
31+
**A restart of the map is required for the changes to take effect**
32+
#
33+
34+
35+
# <a name="download"></a>Download
36+
- GSC Script: [AlwaysUAV](https://github.com/LastDemon99/IW5_Sripts/releases/download/a-uav-v1/AlwaysUAV.gsc)
37+
#
38+
39+
# <a name="credits"></a>Credits
40+
- LethalBeats Team
41+
- The Plutonium team for gsc implementation
42+
43+
# <a name="sponsor"></a>Sponsor
44+
If you like my work and wish to contribute:<br><br/>
45+
-Btc: bc1q07ke80u33uu4ymvhgmsrlay3xt7emt253rgqxq<br/>
46+
-Eth: 0x50C34b8D20d2a195CC35cF506375EdE3B84548dE<br/>
47+
<a href="https://www.paypal.com/paypalme/lastdemon99/"><img src="https://github.com/LastDemon99/LastDemon99/blob/main/Data/paypal_dark.svg" height="60"></a>

GSC/SmallScripts/advanced_uav_always_on.gsc

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)