Spoiler
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
if CKA == nil then CKA = {} end v_timer = 30 -- Time Vote Kick . ban_timer = 3 -- Time Banned . id_config = 0 -- Config ID . vote_pl_on = 0 -- Config on/off Vote Player . no = 0 -- no '-' yes = 0 -- yes '-' votin = {} function exist(a) if player(a,"exists") then return player(a,"name") else return "(None)" end end addhook("say","sayf") function sayf(p,txt) if (txt=="vote") then if vote_pl_on == 0 then menu(id,"Vote Player 1/5@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..",Back Page | <--,Next Page |-->") end end if (txt=="yes") then if vote_pl_on == 1 then if votin[id] == "NoVoted" then yes = yes+1 votin[id] = "Voted" msg(string.char(169).."128255000"..player(id,"name").." voted !yes") else msg2(id,string.char(169).."255000000Error:You've already voted!") end end end if (txt=="no") then if vote_pl_on == 1 then if votin[id] == "NoVoted" then no = no+1 votin[id] = "Voted" msg(string.char(169).."128255000"..player(id,"name").." voted !no") else msg2(id,string.char(169).."255000000Error:You've already voted!") end end end end addhook("join","join_config") function join_config(id) if vote_pl_on == 1 then votin[id] = "Voted" else votin[id] = "NoVoted" end end addhook("menu","configuration") function configuration(id,t,b) if vote_pl_on == 0 then if t == "Vote Player 1/5" then if b== 0 then return nil end if b== 1 then vote_pl_on = 1 id_config = 1 CKA.vote_time = v_timer elseif b == 2 then vote_pl_on = 1 id_config = 2 CKA.vote_time = v_timer elseif b == 3 then vote_pl_on = 1 id_config = 3 CKA.vote_time = v_timer elseif b == 4 then vote_pl_on = 1 id_config = 4 CKA.vote_time = v_timer elseif b == 5 then vote_pl_on = 1 id_config = 5 CKA.vote_time = v_timer elseif b == 6 then vote_pl_on = 1 id_config = 6 CKA.vote_time = v_timer elseif b == 7 then vote_pl_on = 1 id_config = 7 CKA.vote_time = v_timer elseif b == 8 then elseif b == 9 then menu(id,"Vote Player 2/5@b,"..exist(8)..","..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..",Back Page | <--,Next Page |-->") end end if t == "Vote Player 2/5" then if b == 0 then return nil end if b == 1 then vote_pl_on = 1 id_config = 8 CKA.vote_time = v_timer elseif b == 2 then vote_pl_on = 1 id_config = 9 CKA.vote_time = v_timer elseif b == 3 then vote_pl_on = 1 id_config = 10 CKA.vote_time = v_timer elseif b == 4 then vote_pl_on = 1 id_config = 11 CKA.vote_time = v_timer elseif b == 5 then vote_pl_on = 1 id_config = 12 CKA.vote_time = v_timer elseif b == 6 then vote_pl_on = 1 id_config = 13 CKA.vote_time = v_timer elseif b == 7 then vote_pl_on = 1 id_config = 14 CKA.vote_time = v_timer elseif b == 8 then menu(id,"Vote Player 1/5@b,"..exist(1)..","..exist(2)..","..exist(3)..","..exist(4)..","..exist(5)..","..exist(6)..","..exist(7)..",Back Page | <--,Next Page |-->") elseif b == 9 then menu(id,"Vote Player 3/5@b,"..exist(15)..","..exist(16)..","..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..",Back Page | <--,Next Page |-->") end end if t == "Vote Player 3/5" then if b == 0 then return nil end if b == 1 then vote_pl_on = 1 id_config = 15 CKA.vote_time = v_timer elseif b == 2 then vote_pl_on = 1 id_config = 16 CKA.vote_time = v_timer elseif b == 3 then vote_pl_on = 1 id_config = 17 CKA.vote_time = v_timer elseif b == 4 then vote_pl_on = 1 id_config = 18 CKA.vote_time = v_timer elseif b == 5 then vote_pl_on = 1 id_config = 19 CKA.vote_time = v_timer elseif b == 6 then vote_pl_on = 1 id_config = 20 CKA.vote_time = v_timer elseif b == 7 then vote_pl_on = 1 id_config = 21 CKA.vote_time = v_timer elseif b == 8 then menu(id,"Vote Player 2/5@b,"..exist(8)..","..exist(9)..","..exist(10)..","..exist(11)..","..exist(12)..","..exist(13)..","..exist(14)..",Back Page | <--,Next Page |-->") elseif b == 9 then menu(id,"Vote Player 4/5@b,"..exist(22)..","..exist(23)..","..exist(24)..","..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..",Back Page | <--,Next Page |-->") end end if t == "Vote Player 4/5" then if b == 0 then return nil end if b == 1 then vote_pl_on = 1 id_config = 22 CKA.vote_time = v_timer elseif b == 2 then vote_pl_on = 1 id_config = 23 CKA.vote_time = v_timer elseif b == 3 then vote_pl_on = 1 id_config = 24 CKA.vote_time = v_timer elseif b == 4 then vote_pl_on = 1 id_config = 25 CKA.vote_time = v_timer elseif b == 5 then vote_pl_on = 1 id_config = 26 CKA.vote_time = v_timer elseif b == 6 then vote_pl_on = 1 id_config = 27 CKA.vote_time = v_timer elseif b == 7 then vote_pl_on = 1 id_config = 28 CKA.vote_time = v_timer elseif b == 8 then menu(id,"Vote Player 3/5@b,"..exist(15)..","..exist(16)..","..exist(17)..","..exist(18)..","..exist(19)..","..exist(20)..","..exist(21)..",Back Page | <--,Next Page |-->") elseif b == 9 then menu(id,"Vote Player 5/5@b,"..exist(29)..","..exist(30)..","..exist(31)..","..exist(32)..",,,,Back Page | <--,(Next Page |-->)") end end if t == "Vote Player 5/5" then if b == 0 then return nil end if b == 1 then vote_pl_on = 1 id_config = 29 CKA.vote_time = v_timer elseif b == 2 then vote_pl_on = 1 id_config = 30 CKA.vote_time = v_timer elseif b == 3 then vote_pl_on = 1 id_config = 31 CKA.vote_time = v_timer elseif b == 4 then vote_pl_on = 1 id_config = 32 CKA.vote_time = v_timer elseif b == 5 then elseif b == 6 then elseif b == 7 then elseif b == 8 then menu(id,"Vote Player 4/5@b,"..exist(22)..","..exist(23)..","..exist(24)..","..exist(25)..","..exist(26)..","..exist(27)..","..exist(28)..",Back Page | <--,Next Page |-->") elseif b == 9 then end end end end addhook("leave","leave_config") function leave_config(id) if vote_pl_on == 1 then if id_config == id then reset_kick(); msg(string.char(169).."000255000[Console]"..string.char(169).."255255000"..player(id_config,"name").." exit in vote.") end end end addhook("second","secund") function secund() if vote_pl_on == 1 then if CKA.vote_time > 0 then CKA.vote_time = CKA.vote_time-1 parse("hudtxt 0 \""..string.char(169).."255255000Kick "..string.char(169).."202225255"..player(id_config,"name").." "..string.char(169).."255255000? "..string.char(169).."000255000Yes: "..yes.." "..string.char(169).."255000000No: "..no.." "..string.char(169).."202225255Time: "..CKA.vote_time.."\" 8 395 0") end if CKA.vote_time == 0 then if yes > no then msg(string.char(169).."000255000[Console]"..string.char(169).."255000000Vote Accepted.") parse("banip "..id_config.." "..ban_timer) end if yes == no then msg(string.char(169).."000255000[Console]"..string.char(169).."255255255Vote Draw.") end if yes < no then msg(string.char(169).."000255000[Console]"..string.char(169).."000000175Vote Denied.") end reset_kick(); end end end function reset_kick() CKA.vote_time = v_time parse("hudtxtalphafade 0 0 2000 0") vote_pl_on = 0 yes = 0 no = 0 for id = 1,32 do votin[id] = "NoVoted" end end