-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,clan_sidepanel_drawchannel].cs2
97 lines (97 loc) · 3.38 KB
/
[proc,clan_sidepanel_drawchannel].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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// 4399
[proc,clan_sidepanel_drawchannel](boolean $boolean0, int $int1, component $component2, int $int3, component $component4)
def_int $clanslot5 = activeclanchannel_getuserslot(removetags(chat_playername));
def_int $int6 = -1;
if ($clanslot5 ! -1) {
$int6 = activeclanchannel_getuserrank($clanslot5);
}
def_int $int7 = ~clan_permission_get(kick_from_chat_2955);
def_int $int8 = ~clan_permission_get(ban_from_chat_2956);
def_int $int9 = 15;
if (~on_mobile = true) {
$int9 = scale(8, 5, $int9);
}
def_int $int10 = calc(($int9 - 13) / 2);
def_int $width11 = calc(13 + 1);
def_int $height12 = 0;
def_string $string0 = "";
def_string $username1 = "";
def_int $int13 = 0;
def_int $world14 = 0;
def_int $int15 = 0;
def_string $string2 = "";
def_graphic $graphic16 = null;
def_int $clanslot17 = 0;
def_int $int18 = 0;
while ($int18 < $int1) {
$clanslot17 = activeclanchannel_getsorteduserslot($int18);
$string0, $height12, $world14 = activeclanchannel_getuserdisplayname($clanslot17), calc($int18 * $int9), activeclanchannel_getuserworld($clanslot17);
$int15, $username1 = activeclanchannel_getuserrank($clanslot17), removetags($string0);
cc_create($component2, ^iftype_text, $int3);
$int3 = calc($int3 + 1);
cc_setsize($width11, $int9, ^setsize_minus, ^setsize_abs);
cc_setposition(0, $height12, ^setpos_abs_right, ^setpos_abs_top);
cc_settextfont(p11_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_setcolour(^white);
cc_settextshadow(false);
cc_settext($string0);
.cc_create($component2, ^iftype_text, $int3);
$int3 = calc($int3 + 1);
.cc_setsize($width11, $int9, ^setsize_minus, ^setsize_abs);
.cc_setposition(0, $height12, ^setpos_abs_right, ^setpos_abs_top);
.cc_settextfont(p11_full);
.cc_settextalign(^settextalign_right, ^settextalign_centre, 0);
.cc_settext("W<tostring($world14)>");
if ($world14 = map_world) {
.cc_setcolour(0x0dc10d);
} else {
.cc_setcolour(0xffff64);
}
.cc_settextshadow(false);
.cc_create($component2, ^iftype_graphic, $int3);
$int3 = calc($int3 + 1);
.cc_setsize(13, 13, ^setsize_abs, ^setsize_abs);
.cc_setposition(1, calc($height12 + $int10), ^setpos_abs_left, ^setpos_abs_top);
$string2, $graphic16 = ~script4302($int15);
.cc_setgraphic($graphic16);
if ($clanslot5 ! $clanslot17) {
if (friend_test($username1) = true) {
cc_setop(9, "Remove friend");
.cc_setop(9, "Remove friend");
$int13 = 1;
} else if (ignore_test($username1) = true) {
cc_setop(10, "Remove ignore");
.cc_setop(10, "Remove ignore");
$int13 = 2;
} else {
cc_setop(9, "Add friend");
.cc_setop(9, "Add friend");
cc_setop(10, "Add ignore");
.cc_setop(10, "Add ignore");
$int13 = -1;
}
if ($int15 <= -1) {
if ($int6 >= $int7) {
cc_setop(7, "Kick guest");
.cc_setop(7, "Kick guest");
}
if ($int6 >= $int8) {
cc_setop(8, "Ban guest");
.cc_setop(8, "Ban guest");
}
}
cc_setopbase("<col=ff9040><$string0></col>");
.cc_setopbase("<col=ff9040><$string0></col>");
cc_setonop("clan_sidepanel_op(event_opbase, event_opindex, $int13, $boolean0, $clanslot17)");
.cc_setonop("clan_sidepanel_op(event_opbase, event_opindex, $int13, $boolean0, $clanslot17)");
}
$int18 = calc($int18 + 1);
}
$height12 = calc($int1 * $int9);
if ($height12 > if_getheight($component2)) {
if_setscrollsize(0, $height12, $component2);
} else {
if_setscrollsize(0, 0, $component2);
}
~scrollbar_resize($component4, $component2, if_getscrolly($component2));