Forum

> > CS2D > Scripts > Round image
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Round image

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Round image

francis007
BANNED Off Offline

Zitieren
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!

alt Re: Round image

Louie
User Off Offline

Zitieren
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!

alt Re: Round image

Dousea
User Off Offline

Zitieren
@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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht