Players join with id 0, and have NPC?
#1

Hi, I tried to search the forum, and I couldn't find anything similar to my question.

I want to know, is it possible for players to join starting at id 0 and have NPC's?
Example: I have 20 bots, and when I join my id is 19!

I just want players to join and have id's starting from 0.

Is it possible? Sorry if you can't understand my question.. it's hard to explain.
Reply
#2

Why u want that anyway? :P

I dont think it-s posible unless the NPCs join After the player did. The player ids are given in order of logging in :P
Reply
#3

NPC-bots are counted as players too. So if you have 100 slots and 5 NPC-bots, you'll only have 95 slots.
Reply
#4

Aha ok, well thanks anyways. It was just bothering me that I would be first player and my id is 19 lol
Reply
#5

Quote:
Originally Posted by McKinley
NPC-bots are counted as players too. So if you have 100 slots and 5 NPC-bots, you'll only have 95 slots.
I think he already knows that, he was asking if there could be NPCs on the server (which connect from ID 0>) and have players connecting with ID 0.

It's possible; if you added "fake" bots for the player slots from 0+, then your real NPCs, and kicked the fake ones.

Here's an example:
- I have a 100 slot server
- I have 20 NPC's
- I would have 80 playable player slots after adding the NPCs
- In that case, I would write a script to connect 80 fake bots, taking up player IDs 0-79
- The script(s) would then add the 20 real NPCs, taking up player IDs 80-99
- The script would then kick the 80 fake bots, freeing up player IDs 0-79 and allowing players to connect as normal from player ID 0+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)