-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,br_loadout_insert].cs2
50 lines (50 loc) · 1.52 KB
/
[clientscript,br_loadout_insert].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// 3068
[clientscript,br_loadout_insert](component $component0, int $comsubid1, component $drop2, int $dropsubid3, int $count4, int $int5, enum $enum6, enum $enum7, component $component8, int $comsubid9, int $comsubid10, component $drop11, component $drop12, component $component13)
if (cc_find($component0, $comsubid1) = ^true) {
cc_setontimer(null);
}
if (cc_find($component8, $comsubid9) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid10) = ^true) {
cc_sethide(true);
}
def_namedobj $namedobj14 = enum(int, namedobj, $enum6, $count4);
if ($namedobj14 = null) {
return;
}
def_int $int15 = 0;
def_int $int16 = -1;
if ($drop2 = $drop11) {
if ($dropsubid3 >= 0 & $dropsubid3 < inv_size(inv)) {
$int16 = $dropsubid3;
}
$int15 = 1;
}
def_int $int17 = inv_size(worn);
if ($int16 = -1) {
while ($int17 > 0) {
$int17 = calc($int17 - 1);
if ($int16 = -1 & enum(int, component, $enum7, $int17) = $drop2) {
$int16, $int15 = $int17, 0;
}
}
}
if ($int16 = -1) {
return;
}
if ($int15 = 0) {
if (oc_param($namedobj14, loadout_iteminfo) ! $int16) {
return;
}
} else if (enum(int, namedobj, $enum6, ~br_loadout_get_inv($int5, $int16)) ! null) {
~br_loadout_additem($count4, $namedobj14, $int16, $int5, $enum6, $enum7, $component8, $drop11, $drop12, $component13);
return;
}
sound_synth(interface_select1, 1, 0);
if ($int15 = 1) {
~br_loadout_set_inv($int5, $int16, $count4);
} else {
~br_loadout_set_worn($int5, $int16, $count4);
}
~br_loadout_drawloadout($int5, $enum6, $enum7, $component8, $drop11, $drop12, $component13);