You are here: Big Brother Bot ForumCommunity DevelopersPlugin DevelopersCan't get sv_maxclients var of a UrT server
Pages: [1]   Go Down
  Print  
Author Topic: Can't get sv_maxclients var of a UrT server  (Read 483 times) Bookmark and Share
B3 Contrib/Support
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 124
Offline Offline
« on: January 21, 2012, 02:40:34 PM »

Hello I've allready written some plugins for B3.
I have to modify one (Extraadmin) it's not very hard. I've already doing thing very more difficult but I can't..

I try this :

Quote
        self.Nbports = self.console.game.maxclients
        self.debug(self.Nbports)
        while self.i <= self.Nbports:
                self.tableau.append('S' + str(self.i))
                self.i = self.i + 1
        self.debug(self.tableau)

But when I see the b3.log,  self.Nbports = 0 and tableau = [].

(I've tried also whis sv_maxclients)
Logged

B3 Contrib/Support
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 133
Offline Offline
WWW
« Reply #1 on: January 21, 2012, 04:30:11 PM »

and with

Code:
self.Nbports = self.console.getCvar('sv_maxclients').getInt()
?
Logged
B3 Contrib/Support
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 124
Offline Offline
« Reply #2 on: January 22, 2012, 09:48:56 AM »

It's working ! Thanks little bigorneau, shame on me !!!!!!!
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal