Forum

> > CS2D > Scripts > Bot join
Forums overviewCS2D overview Scripts overviewLog in to reply

English Bot join

2 replies
To the start Previous 1 Next To the start

old Bot join

Ekkoz
User Off Offline

Quote
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

old Re: Bot join

Yates
Reviewer Off Offline

Quote
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.

old Re: Bot join

Ekkoz
User Off Offline

Quote
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 ?
edited 1×, last 28.07.17 05:25:07 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview