Forum

> > CS2D > Scripts > information about the file
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch information about the file

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt information about the file

Mr Jack1e
User Off Offline

Zitieren
hello. for example I have a file sss.txt in cs2d/sys directory. anybody know how to make a script that would count how much lines are there in sss.txt on every spawn and show a message with that number.

or how much strings "number" there

alt Re: information about the file

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
local count = 0
while true do
	local line = io.read()
	if line == nil then break end
	count = count + 1
end

or

1
2
3
4
5
6
local count = 0
while true do
	if string.find(io.read(), 'number') then
		count = count + 1
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht