Forum

> > CS2D > Scripts > Round image
Forums overviewCS2D overview Scripts overviewLog in to reply

English Round image

4 replies
To the start Previous 1 Next To the start

old Round image

francis007
BANNED Off Offline

Quote
Hey guys!

I need a script if CT or T winn a round then come a image like 'Humans Win!' or 'Zombies Win!' like in !LS Zombie Plague or [Kgb2d] - Zombies. I have the images but i dont have this script. please make gfx/zombie/xxx.bmp because i know how to change it

Thanks!

old Re: Round image

Louie
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
addhook("endround","_endround")
function _endround(mode)
	if mode == 1 then
		img = image("Your_Image_Path", x, y, 2)
		timer(5000, "freeimage", img)
	elseif mode == 2
		img = image("Your_Image_Path", x, y, 2)
		timer(5000, "freeimage", img)
	end
end
Didn't tested.
Note: the x,y must be numbers!

old Re: Round image

Dousea
User Off Offline

Quote
@user GeoB99: Why 317 for the x-axis? 640 / 2 = 320.

1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("endround", "endroundhook")

function endroundhook(mode)
	if (mode == 1) then
		local imageid = image("<path>", 320, 240, 2)
		
		timer(3000, "freeimage", image)
	elseif (mode == 2) then
		local imageid = image("<path>", 320, 240, 2)
		
		timer(3000, "freeimage", image)
	end
end
Basically it does the same as user Louie's but keeping the variable that stored the image ID at the local scope so there will be no conflict when you have a global variable named img or imageid in this case.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview