Forum

> > CS2D > Scripts > First infection Lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch First infection Lua

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt First infection Lua

kewixasd
User Off Offline

Zitieren
Hello.
im going to come to you for help.
First infection lua script would need.
Which counts back to 30 seconds until the first infection.

id be grateful for your help.xxd
1× editiert, zuletzt 07.09.21 18:29:10

alt Re: First infection Lua

Mami Tomoe
User Off Offline

Zitieren
Then if it's simple, you can make it yourself.

Or... Just use the script above (or similar scripts) and strip out the parts that you do not need.

alt Re: First infection Lua

Bowlinghead
User Off Offline

Zitieren
If someone like user kewixasd would form an understandable sentence with exact criteria what he wants and what the script shall be able to do... Maybe some people would be engaged to help him.
Zitat
First infection lua script would need.
Which counts back to 30 seconds until the first infection.

All I understand is a script that writes "first infection" after 30secs.
Either way, it takes time to help you, wether it is the script itself or pasting some code or giving references - whatever. So YOU should take time to write those posts TOO - that is part of being thankful, atleast in my opinion.

alt Re: First infection Lua

ohaz
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook("startround", "start_countdown")
addhook("second", "countdown_count")

countdown_running = false
countdown_remaining = 30

function start_countdown(mode)
	countdown_remaining = 30
	countdown_running = true
end

function countdown_count()
	if (countdown_running) then
		countdown_remaining = countdown_remaining - 1
		msg("Time remaining " .. countdown_remaining)
		if (countdown_remaining <= 0) then
			countdown_running = false
			msg("Infection")
		end
	end
end
1× editiert, zuletzt 07.09.21 19:38:05

alt Re: First infection Lua

Mami Tomoe
User Off Offline

Zitieren
user Xirot hat geschrieben
Just paste the code or do not reply dude.

Oh, you're a moderator now?

@user ohaz:
I'm fairly certain he wants a random survivor to transform into a zombie.
Which means the following:
All players should become survivors on round start.
A random survivor should become a zombie after the countdown ends.

Also, you can't use
-=
in Lua.

alt Re: First infection Lua

ohaz
User Off Offline

Zitieren
user Mami Tomoe hat geschrieben
@user ohaz:
I'm fairly certain he wants a random survivor to transform into a zombie.
Which means the following:
All players should become survivors on round start.
A random survivor should become a zombie after the countdown ends.
They haven't asked for that though. I have implemented exactly what they asked for.

Zitat
Also, you can't use
-=
in Lua.

Thanks for the hint with the -=, I haven't coded in Lua in ages.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht