Forum

> > CS2D > Scripts > Add bot with ID chosen
Forums overviewCS2D overview Scripts overviewLog in to reply

English Add bot with ID chosen

6 replies
To the start Previous 1 Next To the start

old Add bot with ID chosen

Alexsandro
User Off Offline

Quote
Hello

I wonder if it is possible to add a bot with an id already defined?
Type I add it with an id already chosen by me

old Re: Add bot with ID chosen

DC
Admin Off Offline

Quote
IDs are allocated by CS2D automatically. You can't do that manually and there is also no reason to do it manually.
Your script is bad if it requires a certain player to have a certain ID. Use variables!

old Re: Add bot with ID chosen

aleksix
User Off Offline

Quote
Well,it's possible to make some bots,so the next one will use the required ID,then somehow delete the old bots. Really dirty and useless way. Why do you need it,anyway?

old Re: Add bot with ID chosen

Apache uwu
User Off Offline

Quote
If you want to know the ID of the bot that you are going to add to the server. Just do a loop from 1 to 32, if there isn't a player existent there already, then that's the ID that the bot will take.

Ex.

1
2
3
4
5
6
for i=1,32 do
	if player(i,"exists")==false then
		botID=i
		break
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview