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.
Thanks
For question 3: [b][url=http://wiki.garrysmod.com/?title=G.MaxPlayers]G.MaxPlayers [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
for question 2: on maxplayer change, use that function...
1.
[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.
[QUOTE=grea$emonkey;21699778]I'm pretty sure that if you delete one, the next entity to be spawned takes it's index, but I'm not certain.[/QUOTE]
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
[QUOTE=Tobba;21700033]1. i think he means the max entities before crash which is 2048[/QUOTE]
Wouldn't it entirely depend on the computer?
[QUOTE=MakeR;21700007]From my experience it doesn't, once an entity takes an index, even if it is deleted, the index will not be used again.[/QUOTE]
Oh right. I must have been thinking of player.GetAll indexes. :doh:
[QUOTE=MakeR;21700087]Wouldn't it entirely depend on the computer?[/QUOTE]
after 2048 entities you crash with the "No free edics" error
[QUOTE=Tobba;21700147]after 2048 entities you crash with the "No free edics" error[/QUOTE]
Oh, so it is a source limitation.
Sorry, you need to Log In to post a reply to this thread.