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
StartingLives = 3
StartingBullets = 1
NextMapType = 1
Maps = {"de_dust","de_dust2"}
RandomSpawns = 1
function Array(m,v)
local array = {}
if v == nil then v = 0 end
for i = 1,m do
array[i] = v
end
return array
end
if RandomSpawns == 0 then
parse("mp_randomspawn 0")
else
parse("mp_randomspawn 1")
end
parse("sv_gamemode 1")
parse("mp_wpndmg knife 100")
parse("mp_wpndmg_z1 knife 100")
parse("mp_wpndmg deagle 100")
TitlePos = "260 40"
AuthorPos = "270 55"
LivesPos = "50 50"
BulletsPos = "50 65"
YouAreDeadPos = "50 80"
att1 = Array(game("sv_maxplayers"),0)
Lives = Array(game("sv_maxplayers"),StartingLives)
Bullets = Array(game("sv_maxplayers"),StartingBullets)
addhook("join","OnJoin")
function OnJoin(id)
Lives[id] = 3
Bullets[id] = 1
parse('hudtxt2 '..id..' 1 "©000255000One in the Champer" '..TitlePos)
parse('hudtxt2 '..id..' 2 "©000255000By: Anders4000" '..AuthorPos)
end
function AutoSpec(id)
parse("makespec "..id)
parse('hudtxt2 '..id..' 5 "©255000000You are dead."'..YouAreDeadPos)
end
addhook("spawn","OnSpawn")
function OnSpawn(id)
if Lives[id] < 1 then
AutoSpec(id)
else
Bullets[id] = 1
parse("equip "..id.." 3")
if player(id,"team") == 2 then
parse("strip "..id.." 1")
elseif player(id,"team") == 1 then
parse("strip "..id.." 2")
end
parse("setweapon "..id.." 3")
end
parse('hudtxt2 '..id..' 3 "©000255000Lives: '..Lives[id]..'" '..LivesPos)
parse('hudtxt2 '..id..' 4 "©000255000Bullets: '..Bullets[id]..'" '..BulletsPos)
end
addhook("buy","OnBuy")
function OnBuy(id)
return 1
end
addhook("attack","OnAttack")
function OnAttack(id)
att1[id] = 1
if player(id,"weapontype") == 3 then
Bullets[id] = Bullets[id] - 1
if Bullets[id] < 1 then
parse("strip "..id.." 3")
parse("setweapon "..id.." 50")
end
end
parse('hudtxt2 '..id..' 4 "©000255000Bullets: '..Bullets[id]..'" '..BulletsPos)
end
addhook("attack2", "att1_off")
function att1_off(id)
att1[id] = 0
end
addhook("kill","OnKill")
function OnKill(killer,victim,weapon)
if weapon == 50 then
if att1[id] == 1 then
Bullets[killer] = Bullets[killer] + 2
end
else
Bullets[killer] = Bullets[killer] + 1
end
parse("equip "..killer.." 3")
parse("setweapon "..killer.." 3")
parse('hudtxt2 '..killer..' 4 "©000255000Bullets: '..Bullets[killer]..'" '..BulletsPos)
for b = 1, game("sv_maxplayers"), 1 do
if Lives[b] == 0 then
if #player(0,"tableliving") < 2 then
NextMap()
end
end
end
end
addhook("drop","OnDrop")
function OnDrop()
return 1
end
addhook("die","OnDeath")
function OnDeath(victim)
if Lives[victim] < 2 then
parse("setdeaths "..victim.." 3")
AutoSpec(victim)
else
Lives[victim] = Lives[victim] - 1
end
parse('hudtxt2 '..victim..' 3 "©000255000Lives: '..Lives[victim]..'" '..LivesPos)
end
addhook("team","OnTeam")
function OnTeam(id,team)
if Lives[id] < 1 then
return 1
end
end
function NextMap()
if NextMapType == 2 then
else
parse("restart 15")
end
end