addhook("spawn","freeimg") function freeimg(id) 	for id=1,32 do 	if player(id,"team") == 1 then 		id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i)	 		imagecolor(id,0,255,255)						 		imageblend(id,1)								 		imagealpha(id,0.5) 	else 	if player(id,"team") == 2 then	 		id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i)	 		imagecolor(id,255,255,0)						 		imageblend(id,1)								 		imagealpha(id,0.5) 	end end
Forum
CS2D Scripts My lua not working why?My lua not working why?
5 replies 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("spawn","freeimg") function freeimg(id) for id=1,32 do if player(id,"team") == 1 then id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i) imagecolor(id,0,255,255) imageblend(id,1) imagealpha(id,0.5) elseif player(id,"team") == 2 then id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i) imagecolor(id,255,255,0) imageblend(id,1) imagealpha(id,0.5) end end end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("spawn","freeimg") function freeimg(id) for id=1,32 do if player(id,"team") == 1 then id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i) imagecolor(id,0,255,255) imageblend(id,1) imagealpha(id,0.5) else if player(id,"team") == 2 then id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i) imagecolor(id,255,255,0) imageblend(id,1) imagealpha(id,0.5) end end <----- end
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
addhook ("spawn", "freeimg") function freeimg (id) 	local img = image ("gfx/Java Gfx/defensiveaura.png", 0, 0, (200 + id)) 	 	if (player (id, "team") == 1) then 		imagecolor (img, 0, 255, 255) 	elseif (player (id, "team") == 2) then 		imagecolor (img, 255, 255, 0) 	end 	 	imageblend (img, 1) 	imagealpha (img, 0.5) end
function freeimg(id)
for id=1,32 do
if player(id,"team") == 1 then
id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i)
imagecolor(id,0,255,255)
imageblend(id,1)
imagealpha(id,0.5)
end
if player(id,"team") == 2 then
id=image("gfx/Java Gfx/defensiveaura.png",0,0,200+i)
imagecolor(id,255,255,0)
imageblend(id,1)
imagealpha(id,0.5)
end
end
1