Forum

> > CS2D > Scripts > Script Request
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script Request

1 reply
To the start Previous 1 Next To the start

old Script Request

sheeL
User Off Offline

Quote
When say : !help <TEXT>
A Message is Sent to all Server, Every 50 Seconds

1
2
3
4
5
addhook("say","ttt")
function ttt(id,text)
if text == "!help" then
blabla
end

old Re: Script Request

Apache uwu
User Off Offline

Quote
Like this?

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("second","_second")
addhook("say","_say")

serverMsg={
	color="255255255",
	msg="Please use !help to change this message.",
	count=0,
	rate=50
}

function _second()
	serverMsg.count=serverMsg.count-1
	if serverMsg.count<=0 then
		msg(string.char(169)..serverMsg.color..serverMsg.msg)
		serverMsg.count=serverMsg.rate
	end
end

function _say(id,message)
	if string.sub(message,1,6)=="!help " then
		serverMsg.msg=string.sub(message,7)
		msg2(id,string.char(169).."000255000Server message set!")
		return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview