Posts: 116
	Threads: 10
	Joined: Jun 2011
	
	
 
	
		
		
		21 Jan 13, 10:13PM 
(This post was last modified: 21 Jan 13, 10:13PM by 888.)
		
	 
	
		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?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,331
	Threads: 44
	Joined: Jun 2010
	
	
 
	
		
		
		21 Jan 13, 10:18PM 
(This post was last modified: 21 Jan 13, 10:25PM by Bukz.)
		
	 
	
		[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]
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 116
	Threads: 10
	Joined: Jun 2011