Display a picture in the middle of the screen
7 replies



26.11.12 10:51:49 pm
Can anybody make a script , that it would display a picture in the middle of the script , when you play.
Example : http://unrealsoftware.de/files_show.php?file=9744
It says " Blue flag taken" but instead of words , it would display a pic .
Example : http://unrealsoftware.de/files_show.php?file=9744
It says " Blue flag taken" but instead of words , it would display a pic .
It shows image for all players:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
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
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
But it displays it when i press F2 , or F3 , but I need that you wouldn't need to press buttons and it could stay forever.
Learn LUA. Nobody is going to waste time just to help you.
Add this somewhere in your code:
Add this somewhere in your code:
Code:
1
image("gfx/cs2d.bmp", 320, 240, 2);
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 I guess you need this:
Did not tested but should work.
EDIT: It works :3
Code:
1
2
3
4
5
6
7
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
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



