AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Max Players (https://forums.alliedmods.net/showthread.php?t=23011)

commonbullet 01-08-2006 15:46

Max Players
 
Dumb question.

I've seen in many amxx native functions, players array dimensioned to 32, just like
Code:

get_players ( players[32], &num, const flags = )
But i.e., many CS maps there is room (spawns) for 36 players...

Hawk552 01-08-2006 16:07

Ignore the extra spawns.

Besides that, what's your question?

commonbullet 01-08-2006 16:11

Suppose there are 36 players in a server, I wonder if this function would work for retrieving an id from a player indexed as "34" for instance.

Hawk552 01-08-2006 16:12

I don't think so.

Depends on what you're doing, if you really want, for example, to find all bots, just do this:

Code:
new bots; for(new i = 1;i <= 36;i++) {       if(is_user_bot(i))       {               bots++;       } }

commonbullet 01-08-2006 16:19

not for counting...

i.e. suppose you want to change the model of that 34th player...
you'd have to use something like
cs_set_user_model (34,...)

but it's out there at the documentation
Code:

cs_set_user_model ( index, const model[] )
index is a player index from 1 to 32.


Hawk552 01-08-2006 16:21

I don't think it would work.

It's hardcoded into the engine to have a max of 32 players.

The 36 might just be to randomize the location people spawn in.

commonbullet 01-08-2006 16:23

That's what I needed to know.
Thank you.

Brad 01-08-2006 16:35

Quote:

Originally Posted by Hawk552
I don't think it would work.

It won't.

Quote:

Originally Posted by Hawk552
The 36 might just be to randomize the location people spawn in.

It is.

Ingram 01-08-2006 17:45

Quote:

Originally Posted by Brad
Quote:

Originally Posted by Hawk552
The 36 might just be to randomize the location people spawn in.

It is.

the teams could be 18v14...

Dirty DuMont 01-09-2006 01:40

:lol:


All times are GMT -4. The time now is 15:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.