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
function array(number,value)
	if not value then value = 0 end
	local array = {}
	for i = 1, number do
		array[i]=value
	end
	return array
end
fpow=array(32,100)
fon=array(32)
ft=array(32,0)
addhook("flashlight","n_fl")
function n_fl(id,state)
if state==1 then
fon[id]=1
if ft[id]== 0 then
ft[id]=image("gfx/sprites/light.bmp",1,1,132+id)
imagecolor(ft[id],255,255,255)
imageblend(ft[id],1)
imagealpha(ft[id],0+(fpow[id]/100))
end
else
if ft[id]~= 0 then
freeimage(ft[id])
ft[id]=0
end
fon[id]=0
end
end
addhook("second","n_fls")
function n_fls()
for id=1,32 do
if player(id,"exists") and player(id,"health")>0 then
parse('hudtxt2 '..id..' 30 "©255255255Flashband:'..fpow[id]..'/100" 40 435')
if fon[id]==1 then
if fpow[id]>0 and fpow[id]<=100 then
imagecolor(ft[id],255,255,255)
imagealpha(ft[id],0+(fpow[id]/100))
if fpow[id]>=1 then
fpow[id]=fpow[id]-1
end
end
else
if ft[id]~= 0 then
freeimage(ft[id])
ft[id]=0
end
if fpow[id]<100 then
fpow[id]=fpow[id]+5
if fpow[id]>100 then
fpow[id]=100
end
end
end
end
end
end
addhook("startround","n_flt")
function n_flt()
for id=1,32 do
if player(id,"exists") then
if ft[id]~= 0 then
fpow=array(32,100)
freeimage(ft[id])
ft[id]=0
ft[id]=image("gfx/sprites/light.bmp",1,1,132+id) ---- Here change image url
imagecolor(ft[id],255,255,255)
imageblend(ft[id],1)
imagealpha(ft[id],0+(fpow[id]/100))
end
end
end
end