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
images = {}
images.qty = 0
addhook("attack","makeImages")
function makeImages(id)
local x = player(id,"tilex")
local y = player(id,"tiley")
	if y == 150 then
		if x == 120 then
			images[images.qty] = image("gfx/image1.png",0,0,0)
			imagepos(images[images.qty],x*32+16,y*32+16,player(id,"rot"))
			images.qty = images.qty + 1
		elseif x == 125 then
			images[img_number] = image("gfx/image2.png",0,0,0)
			imagepos(images[img_number],x*32+16,y*32+16,player(id,"rot"))
			images.qty = images.qty + 1
		end
	end
end
addhook("say", "f_say")
function f_say(id, txt)
	if txt=="!removeimages" then
		for i=0, images.qty-1 do
			freeimage(images[i])
		end
		images.qty = 0
		return 1
	end
end