Forum

> > CS2D > Scripts > Add bot with ID chosen
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Add bot with ID chosen

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Add bot with ID chosen

Alexsandro
User Off Offline

Zitieren
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

alt Re: Add bot with ID chosen

DC
Admin Off Offline

Zitieren
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!

alt Re: Add bot with ID chosen

aleksix
User Off Offline

Zitieren
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?

alt Re: Add bot with ID chosen

Apache uwu
User Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht