-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,br_loadout_insert].cs2
50 lines (50 loc) · 1.41 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, component $component5, int $comsubid6, int $comsubid7, component $drop8, component $drop9, component $component10)
if (cc_find($component0, $comsubid1) = ^true) {
cc_setontimer(null);
}
if (cc_find($component5, $comsubid6) = ^true) {
cc_sethide(true);
}
if (cc_find($component5, $comsubid7) = ^true) {
cc_sethide(true);
}
def_namedobj $namedobj11 = enum(int, namedobj, enum_2630, $count4);
if ($namedobj11 = null) {
return;
}
def_int $int12 = 0;
def_int $int13 = -1;
if ($drop2 = $drop8) {
if ($dropsubid3 >= 0 & $dropsubid3 < inv_size(inv)) {
$int13 = $dropsubid3;
}
$int12 = 1;
}
def_int $int14 = inv_size(worn);
if ($int13 = -1) {
while ($int14 > 0) {
$int14 = calc($int14 - 1);
if ($int13 = -1 & enum(int, component, enum_2632, $int14) = $drop2) {
$int13, $int12 = $int14, 0;
}
}
}
if ($int13 = -1) {
return;
}
if ($int12 = 0) {
if (oc_param($namedobj11, param_850) ! $int13) {
return;
}
} else if (enum(int, namedobj, enum_2630, ~br_loadout_get_inv($int13)) ! null) {
~br_loadout_additem($count4, $namedobj11, $int13, $component5, $drop8, $drop9, $component10);
return;
}
sound_synth(interface_select1, 1, 0);
if ($int12 = 1) {
~br_loadout_set_inv($int13, $count4);
} else {
~br_loadout_set_worn($int13, $count4);
}
~br_loadout_drawloadout($component5, $drop8, $drop9, $component10);