Forum

> > CS2D > Scripts > Hide Message
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hide Message

6 replies
To the start Previous 1 Next To the start

old Hide Message

Quattro
GAME BANNED Off Offline

Quote
Hey I can't find this info anywhere, how do I hide message and show HUD message in its place?
I want to do it so when I enter a command for text hook, it would hide your actual message(which was the command) and show the triggered message instead.

old Re: Hide Message

Cure Pikachu
User Off Offline

Quote
Also keeping in mind this, especially once you use multiple scripts using the same hook that returns values like cs2d lua hook say...
sys/lua/info.txt has written
Priority is only important if there is more than one function attached to the same hook!
Default is 0, higher numbers = higher priority, lower numbers (also negative) = lower priority.
The attached function with the HIGHEST priority is the LAST function which will be executed.
Moreover CS2D will take the return value of this function (if there is any)!
edited 1×, last 11.05.18 12:54:43 pm

old Re: Hide Message

Quattro
GAME BANNED Off Offline

Quote
Thanks you guys √

Wait how to use it exactly?

1
2
3
4
5
6
7
addhook("say","debug")

function debug(id,txt)
	if (txt=="t")then
	msg('done')
	end
end

old Re: Hide Message

SQ
Moderator Off Offline

Quote
@user Quattro:
1
2
3
4
5
6
function debug(id,txt)
	if (txt=="t")then
		msg('done')
		return(1)
	end
end

old Re: Hide Message

Quattro
GAME BANNED Off Offline

Quote
Hmm I tried it and it still executes the function then posts "quattro: t"
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview