Forum

> > CS2D > Scripts > Need easy "!say" script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Need easy "!say" script

5 replies
To the start Previous 1 Next To the start

old Need easy "!say" script

phihung940
User Off Offline

Quote
Please, help me this. here is what I need:

- Player type "!mus" then 1 picture/image apear in Full-Screen (of cause I've that images in full screen) or whatever size the picture can be. That picture can be view by Player only - that mean the other player can't see that picture with you, if they wanna view, they have to "!mus" to view - kind like that... forgot, the picture that over/on top of everything - even HUD, that mean your CS2D screen is only that picture, you now can't see ammo,radar, other hud...
- If you are viewing it and dead, the picture disapear
- "!mus" again or "!mus off" to turn off picture.
edited 4×, last 14.09.11 01:37:47 pm

old Re: Need easy "!say" script

if
User Off Offline

Quote
I thought it was impossible for a image to only be seen by 1 player.(not including that image is out of range)

old Re: Need easy "!say" script

Bowlinghead
User Off Offline

Quote
I think its not possible to set the HUD off (ammo, energie)...
you can only set your radar off!
btw
More >

old Re: Need easy "!say" script

Apache uwu
User Off Offline

Quote
yeah that extra param is pretty epic

Something like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("say","_say")
addhook("leave","_leave")

images={}

function _say(id,message)
	if string.lower(message)=="!mus" then
		if images[id]==nil then
			images[id]=image("gfx/fc.png",0,0,2,id)
		else
			freeimage(images[id])
		end
		return 1
	end
end

function _leave(id)
	freeimage(images[id])
	images[id]=nil
end

Just change gfx/fc.png to whatever image, make sure it's the same res as cs2d.

old Re: Need easy "!say" script

phihung940
User Off Offline

Quote
@TC: Um... Houston... we have a problem... after "!mus" to turn off the images, I can't open it again and if the round are finish when you are still viewing, you can't open it again too! =.=

old Re: Need easy "!say" script

Apache uwu
User Off Offline

Quote
Yeah I had expected you to figure that out. I'm only giving you a starter, I'm not going to fill all the gaps for you. I already had done that for leave.

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
addhook("say","_say")
addhook("leave","_leave")
addhook("startround","_startround")

images={}

function _say(id,message)
	if string.lower(message)=="!mus" then
		if images[id]==nil then
			images[id]=image("gfx/fc.png",0,0,2,id)
		else
			freeimage(images[id])
		end
	return 1
	end
end

function _leave(id)
	freeimage(images[id])
	images[id]=nil
end

function _startround()
	images={}
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview