-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.lua
More file actions
42 lines (33 loc) · 1.42 KB
/
__init__.lua
File metadata and controls
42 lines (33 loc) · 1.42 KB
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
level:onnotifyonce("game_ended", function() -- The script is executed after the game ends, if you want it to be executed at the beginning of each game, change "game_ended" to "prematch_over"
local gametypewin = getgametypewin()
local mapwin = getmapwin()
game:executecommand('set sv_maprotationcurrent "gametype ' .. gametypewin .. ' map ' .. mapwin .. '"')
print('set sv_maprotationcurrent "gametype ' .. gametypewin .. ' map ' .. mapwin .. '"')
end)
function getgametypewin()
local gametypesa = {}
table.insert(gametypesa, "war")
table.insert(gametypesa, "dom")
table.insert(gametypesa, "hp")
--table.insert(gametypesa, "sd")
return gametypesa[math.random(#gametypesa)]
end
function getmapwin()
local mapsa = {}
table.insert(mapsa, "mp_convoy")
table.insert(mapsa, "mp_showdown")
table.insert(mapsa, "mp_bog")
table.insert(mapsa, "mp_crash")
table.insert(mapsa, "mp_crossfire")
table.insert(mapsa, "mp_citystreets")
table.insert(mapsa, "mp_shipment")
table.insert(mapsa, "mp_vacant")
table.insert(mapsa, "mp_broadcast")
table.insert(mapsa, "mp_bloc")
table.insert(mapsa, "mp_killhouse")
table.insert(mapsa, "mp_strike")
table.insert(mapsa, "mp_crash_snow")
table.insert(mapsa, "mp_countdown")
table.insert(mapsa, "mp_bog_summer")
return mapsa[math.random(#mapsa)]
end