
sometimes hat disappear... im not sure if its because Worn Weapons script or because there is too much gfx in the server but someone help me please the problem is annoying

My hats script :
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
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
addhook("say","say_hat")
function say_hat(id,txt)
	if (txt=="!angel") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/angel.png",1,1,200+id)
	end
	if (txt=="!dangerous") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/dangerous.png",1,1,200+id)
	end
	if (txt=="!devil") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/devil.png",1,1,200+id)
	end
	if (txt=="!headphones") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/headphones.png",1,1,200+id)
	end
	if (txt=="!nohat") then
		freeimage(id)
	end
	if (txt=="!rock") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/rock.png",1,1,200+id)
	end
	if (txt=="!santa") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/santa.png",1,1,200+id)
	end
	if (txt=="!snowman") then
		freeimage(id)
		id=image("gfx/~{Zombie}~/Hats/snowman.png",1,1,200+id)
	end
end
edited 1×, last 22.05.21 02:22:05 pm
Gfx disappear
1 
Offline
it's just a local variable (value is lost as soon as the function ends) - see