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
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
map_objects = 0
function player_flashlight()
	for i=1,32,1 do
		id=image("gfx/sprites/flashlight.png",1,1,200+i)
		if i == 1 then map_objects = id - 1 end
		imagecolor(id,255,255,255)
		imageblend(id,1)
		imagealpha(id,0.5)
		imagescale(id,1,1)
	end
end
player_flashlight()
addhook("startround","player_flashlight")
addhook("serveraction","server_serveraction")
function server_serveraction(id,button)
	if (button==1) then
		imagealpha(map_objects+id,0.0)
		parse([[sv_sound "flashlight.wav"]])
	else
		imagealpha(map_objects+id,0.5)
		parse([[sv_sound "flashlight.wav"]])
	end
end
Lua Scripts/Questions/Help


Offline
flacko, professional.