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
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
run = initArray(32)
unhitable_player = initArray(32)
-- Serveraction
addhook("serveraction","runservact")
function runservact(id,b)
	if b==1 then
		if run[id]==0 then
			run[id]=1
			msg2(id,"©000255000You are running now!@C")
			parse("speedmod "..id.." 5")
		else
			msg2(id,"©255000000You can't run! You are already running!@C")
		end
	elseif b==2 then
		if run[id]==1 then
			run[id]=0
			msg2(id,"©00025500You stop to run!@C")
			parse("speedmod "..id.." 0")
		else
			msg2(id,"©255000000You can't stop run! You aren't running!@C")
		end
	end
end
-- No Hit
addhook("hit","nohitifrun")
function nohitifrun(id,source,w,hp)
	if run[id]==1 then
		msg2(id,"©255000000You can't hit if you are running!@C")
		parse("sethealth "..id.." "..)
		return 1
	end
end
-- Spawn
addhook("spawn","noautorun")
function noautorun(id)
	run[id]=0
end
-- Leave
addhook("leave","Nosave")
function Nosave(id)
	run[id]=0
end