Forum

> > CS2D > Scripts > Console clear
Forums overviewCS2D overview Scripts overviewLog in to reply

English Console clear

15 replies
To the start Previous 1 Next To the start

old Console clear

limonata
User Off Offline

Quote
Hello all, how i can clear game console?

like this

1
2
3
4
5
6
addhook("say","bla")
function bla(id,txt)
	if txt == "!quite" then
		console.clear()
	end
end

console.clear() --> i know its wrong, just example

old Re: Console clear

Crabby
User Off Offline

Quote
Well, if you want to clear the console just go to console click on right mouse and it will say clear console

old Re: Console clear

Avo
User Off Offline

Quote
Spam your console with strings with spaces.
More >

But it seems that Crabby's idea will work better.

old Re: Console clear

UBMaster
BANNED Off Offline

Quote
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
26
addhook("say","bla")
function bla(id,txt)
if txt == "!quite" then
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
end
end

an estimate.

old Re: Console clear

KagamineLen
User Off Offline

Quote
user UBMaster has written
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
26
addhook("say","bla")
function bla(id,txt)
if txt == "!quite" then
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
print('  ')
end
end

an estimate.


an shorter code.

1
2
3
4
5
6
7
8
addhook("say","_say")
function _say(id,txt)
	if txt == "!quite" then
		for i = 1, 100 do
			print(' ')
		end
	end
end

old Re: Console clear

KimKat
GAME BANNED Off Offline

Quote
addhook("say","c")
function c(p,t)
	if t=="!cls" then l=99 repeat l=l-1 print('') until l==0 end
end
A even shorter version, enjoy!
edited 3×, last 13.06.13 04:08:01 pm

old Re: Console clear

KimKat
GAME BANNED Off Offline

Quote
user limonata has written
@user KimKat: Very good

Edit: Doesnt work. No problem i can use another. Anyway thanks
Lol, my code does work perfectly fine. It ran on this compiler perfectly fine, so it should run well in CS2D aswell undoubtedly. I just had to revise my posts a few times because I pasted the code in the wrong way. That's why you got error or what not.

old Re: Console clear

Crabby
User Off Offline

Quote
OR Just do what I said.
user Crabby has written
Go to console click on right mouse and it will say clear console and click on clear console
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview