Forum

> > CS2D > Scripts > Bot join
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Bot join

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Bot join

Ekkoz
User Off Offline

Zitieren
Hey guys ,how can I do in every round the bots to play in the zombie team ?I set up to play the zombies ,but it only takes a round, after it goes to the zombie and the humans ...and autobalance is disabled ...Who can help me ?I'm new in lua and ...i don't really know how can do to work ...

Sorry for bad English

alt Re: Bot join

Yates
Reviewer Off Offline

Zitieren
1
2
3
4
5
6
7
8
function _endround()
	for _, id in ipairs(player(0, "table")) do
		if player(id, "bot") then
			parse("maket "..id)
		end
	end
end
addhook("endround", "_endround")

Should work, didn't test it.

You may need to change the hook to cs2d lua hook startround if they change team after cs2d lua hook endround is triggered. Possibly even cs2d lua hook startround_prespawn if you disallow respawning after round start.

alt Re: Bot join

Ekkoz
User Off Offline

Zitieren
Ty Yates ,i changed endround with startround and work ,thanks ,good luck .

EDIT : Yates, when there are other players, why do I just go to people, and the other players get them to the zombie ?
1× editiert, zuletzt 28.07.17 17:25:07
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht