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.
Forum
CS2D Scripts Hide MessageHide Message
6 replies 1
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.
Quote
Return Values
0: proceed normally
1: don't show message
0: proceed normally
1: don't show message
Use function return value to cancel the message to be displayed.
1
return(1)
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)!
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
Wait how to use it exactly?
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("say","debug") function debug(id,txt) 	if (txt=="t")then 	msg('done') 	end end
1
2
3
4
5
6
2
3
4
5
6
function debug(id,txt) 	if (txt=="t")then 		msg('done') 		return(1) 	end end
1