Couple Questions

  1. What is the max entities in garrys mod?

  2. Do entitys ids change in map change? Or in maxplayer change?

  3. How do i get the max clients of my server? in lua . Like say i have 25 slots it gives me 25.


For question 3: **[G.MaxPlayers](**

for question 2: on maxplayer change, use that function…

[lua]GetConVarNumber(“sbox_maxenities”) – or something like that.[/lua]
2. Entity indexes are set in order of their creation. So if you spawn a bunch of props in a row, their EntIndex will increment up by one.
I’m pretty sure that if you delete one, the next entity to be spawned takes it’s index, but I’m not certain.

From my experience it doesn’t, once an entity takes an index, even if it is deleted, the index will not be used again.

  1. i think he means the max entities before crash which is 2048

Wouldn’t it entirely depend on the computer?

Oh right. I must have been thinking of player.GetAll indexes. :doh:

after 2048 entities you crash with the “No free edics” error

Oh, so it is a source limitation.