Forum

> > CS2D > Scripts > freeimage
Forums overviewCS2D overview Scripts overviewLog in to reply

English freeimage

1 reply
To the start Previous 1 Next To the start

old freeimage

mrc
User Off Offline

Quote
The problem with this script is, the images doesn't disappear for other users. Can you figure out how to fix it?

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
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end

Kill_lvl = initArray(32)
Kill_timer = initArray(32)
k = {}

addhook("join","j")
function j(id)
Kill_lvl[id]=1
Kill_timer[id]=0
k[id]={}
k[id].Killimagee=0
end

addhook("kill","_kill")
function _kill(id,victim)
if player(id,"team")~=player(victim,"team") then
if Kill_timer[id]>0 then
Kill_lvl[id]=Kill_lvl[id]+1
end
Kill_timer[id]=5
if Kill_lvl[id]<6 then
parse("sv_sound2 "..id.." woman/"..Kill_lvl[id]..".wav")
freeimage(id,Killimageei1) 
k[id].Killimagee = image("gfx/Ajm_badges/"..Kill_lvl[id]..".png", 297, 370, 2,id)
else
parse("sv_sound2 "..id.." woman/6.wav")
freeimage(id,Killimageei1) 
k[id].Killimagee = image("gfx/Ajm_badges/6.png", 297, 370, 2,id)
end
if Kill_lvl[id]==2 then
msg("©000225000"..player(id,"name").." Made a Double Kill!")
elseif Kill_lvl[id]==3 then
msg("©000225000"..player(id,"name").." Made a Multi Kill!")
elseif Kill_lvl[id]==4 then
msg("©000225000"..player(id,"name").." Made a Ultra Kill!")
elseif Kill_lvl[id]==5 then
msg("©000225000"..player(id,"name").." is Unbreakable!!")
elseif Kill_lvl[id]==6 then
msg("©255000000"..player(id,"name").." Is really AwweSomme!!!")
end
freetimer("removeimg",id)
timer(700, "removeimg",id)
end
end

addhook("second","_seconds")
function _seconds()
for _, id in ipairs(player(0, "table")) do
if Kill_timer[id]>0 then
Kill_timer[id]=Kill_timer[id]-1
end
if Kill_timer[id]==0 then
Kill_lvl[id]=1
end
end
end

function removeimg(id)
freeimage(id,Killimagee) 
end

old Re: freeimage

The Gajos
BANNED Off Offline

Quote
1
2
3
function removeimg(id)
freeimage(k[id].Killimagee) 
end
And these lines:
freeimage(id,Killimageei1)
use like this:
removeimg(id)
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview