Forum

> > CS2D > Scripts > Display a picture in the middle of the screen
Forums overviewCS2D overview Scripts overviewLog in to reply

English Display a picture in the middle of the screen

7 replies
To the start Previous 1 Next To the start

old Re: Display a picture in the middle of the screen

mafia_man
User Off Offline

Quote
It shows image for all players:
1
2
3
4
5
6
7
8
9
10
11
12
13
function showImg(path, time) -- time in milliseconds ( 1000 milliseconds = 1 second )
	if imgPicture then
		freeimage(imgPicture);
	end
	
	imgPicture = image(path, 320, 240, 2);
	tween_alpha(imgPicture, time, 0.0);
end

addhook("serveraction","onKey")
function onKey(id)
	showImg("gfx/cs2d.bmp", 1000);
end

old Re: Display a picture in the middle of the screen

Slugness
User Off Offline

Quote
Wow mafia_man thats rude , and yes im learning , and how can you be sure that nobody will help Im sure this community is full of nice and helpful people .

Admin/mod comment

Wrong. Sad, but wrong. /Factis

old Re: Display a picture in the middle of the screen

Suprise
BANNED Off Offline

Quote
I guess you need this:
1
2
3
4
5
6
7
addhook("second","_second")
function _second()
	local livingplayers = player(0,"tableliving")
	for _,id in pairs(livingplayers) do
		image("gfx/cs2d.bmp", 320, 240, 2);
	end
end

Did not tested but should work.
EDIT: It works :3
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview