Pages: [1]   Go Down
  Print  
Author Topic: Select by ping  (Read 261 times) Bookmark and Share
Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« on: January 31, 2012, 10:56:27 AM »

Is there anyway i could select some1 with the highest ping but the user has to be under a certain level?
Logged


[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #1 on: January 31, 2012, 11:16:20 AM »

I guess you would have to take a look at the pingwatch plugin for a good start.

I would create an array with cid and ping values where userlevel is below your threshold, sort them from high to low and the first in the array is the one you are searching for.
Logged

Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #2 on: January 31, 2012, 11:19:03 AM »

would this work for getting the ping of players with levels within 0-1
Code:
clients = self.console.clients.getClientsByLevel(min=0, max=1)
self.console.getPlayerPings(clients).items():
Logged

Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal