Cubescript > curplayers
#1
Hi,
The command "curplayers" work only on the next version .?
Do exist he a command who allow to know the number of player working on 1.1?
Thanks given by:
#2
[cubescript]numplayers = [
numpl = 0
loop npl 21 [
if (! (strcmp (findpn $npl) [])) [
// += numpl 1 // maybe += isn't in 1104?
numpl = (+ $numpl 1)
]
]
result $numpl
][/cubescript]

Might work, have not done anything like that in a while though, you'll have to test it.

Sometimes its better to know the highest valid client number though:

[cubescript]highestvalidcn = [
highestcn = -1
loop hvl 21 [
if (! (strcmp (findpn $hvl) [])) [
highestcn = $hvl
]
]
result $highestcn
][/cubescript]
Thanks given by:
#3
Thank you
Thanks given by: