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
function shuffle()
teams = {
ct = {},
t = {},
spec = {},
counter = 1
}
for k,v in pairs (player(0,"team1")) do
if teams.counter <= 5 then
teams.counter = teams.counter + 1
teams.t[#teams.t+1] = v
else
teams.spec[#teams.spec+1] = v
end
end
teams.counter = 1
for k,v in pairs (player(0,"team2")) do
if teams.counter <= 5 then
teams.counter = teams.counter + 1
teams.ct[#teams.ct+1] = v
else
teams.spec[#teams.spec+1] = v
end
end
for k,v in pairs (teams) do
if type(v) == "table" then
for _, id in pairs (v) do
parse("make"..k.." "..id)
end
end
end
end
1
2
3
4
5
6
addhook("leave","_leave")
function _leave(id,reason)
if reason == 0 then
parse("banip "..player(id,"ip").." -1")
end
end