You don't need frames to view this website. Flash communication server. Flash mx xml socket server.
Home
Main Menu
Home
- - - - - - -
What is Palabre ?
Features
News
FAQ
Forum
DEMO
- - - - - - -
Downloads !
Browse SVN
- - - - - - -
Search
Contact Us
- - - - - - -
Sourceforge Project Page
Python
Links
Palabre on Facebook






Actionscript for Multiplayer games
 
Download Palabre Flash Xml Socket Server DOWNLOAD Download Palabre Flash Xml Socket Server FORUM Download Palabre Flash Xml Socket Server FAQ Download Palabre Flash Xml Socket Server WHAT IS IT
 



Using Palabre ? Coming here for Support ? Please consider making an (even small) donation :)
Palabre Forum  


Post a new message in "Default Forum"
Name:
Subject:
topic icon:
no
boardcode:
 Colour:  Size:   Close all tags
Message:
CAPTCHA: How much is 7 added to 2

Topic History of: order client in room
Max. showing the last posts - (Last post first)
Author Message
wawi teank you, I found solution.



I identity each clients with a number increment



in "palabreServer"





Code:

 
self
.idClients 0





in "PalabreClient.py"

Code:

 
self
.id self.server.idClients
self
.server.idClients += 1




in "PalabreServer" in Method "sendInfoToClient(self,attrs)"

Code:

 
def sendInfoToClient
(self,attrs):
        
"""
        envia informacion especifica al solicitante
        """
        
#Si la informacion solicitada es de tipo "Jugadores en una partida" procedo
        
if attrs['type'] == "players":
            
liste "<info type='players' players='%i'>" len(self.server.allNickNames)

            
armado False
            idMenor 
= -1
            idMayor 
1000000
            currentClient 
None;
            
            while 
armado == False:
                
idMayor 1000000
                
                
for q in self.server.allNickNames.values():        
                    if 
q.isClientInRoom(attrs['heading']):
                        if 
q.id idMenor and q.id idMayor:
                            
idMayor q.id
                            currentClient 
q
                        
                idMenor 
idMayor
                                
                
if idMayor != 1000000:
                        
liste +=  "   <player name='%s' pais='%s' />" % (str(currentClient.nickName), str(currentClient.pais))
                else:
                    
armado True
            
            liste 
+= "</info>"
            
self.clientSendMessage(msg=liste)




I sorted of minor to major.

which is the major Number than can enter in variable numeric? I put 1000000

teank you! bye bye
wawi teank you, I found solution.



I identity each clients with a number increment



in "palabreServer"





self.idClients = 0

Code:


in "PalabreClient.py"

[code]
self.id = self.server.idClients
self.server.idClients += 1
[/code]

in "PalabreServer" in Method "sendInfoToClient(self,attrs)"

[code]
def sendInfoToClient(self,attrs):
"""
envia informacion especifica al solicitante
"""
#Si la informacion solicitada es de tipo "Jugadores en una partida" procedo
if attrs['type'] == "players":
liste = "<info type='players' players='%i'>" % len(self.server.allNickNames)

armado = False
idMenor = -1
idMayor = 1000000
currentClient = None;

while armado == False:
idMayor = 1000000

for q in self.server.allNickNames.values():
if q.isClientInRoom(attrs['heading']):
if q.id > idMenor and q.id < idMayor:
idMayor = q.id
currentClient = q

idMenor = idMayor

if idMayor != 1000000:
liste += " <player name='%s' pais='%s' />" % (str(currentClient.nickName), str(currentClient.pais))
else:
armado = True

liste += "</info>"
self.clientSendMessage(msg=liste)
[/code]

I sorted of minor to major.

which is the major Number than can enter in variable numeric? I put 1000000

teank you! bye bye
celio Hi,



I see no easy way to do this.

Palabre users are stored in a python dictionnary with the nicknames as key, so the order is based on what python returns and it's sorted on the keys ...



But I guess that a plugin could store a different dictionnary sorted by time ...

And you could request this different user list by a specific node ...
wawi How I can order the clients as they go entering to the server?

For Sample:

In room “Lobby” enter client “client_jhon1”

Later:

In room “Lobby” enter client “client_danniele2”

Later:

In room “Lobby” enter client “client_emily3”

Later:

In room “Lobby” enter client “client_robert4”



I like to see(look) the order Hereby:



Code:

 <clients>
    <
client name=”client_jhon1” room=”Lobby” />
    <
client name=”client_danniele2” room=”Lobby” />
    <
client name=”client_emily3” room=”Lobby” />
    <
client name=”client_robert4” room=”Lobby” />
</
clients>


Or:
Code:

 <clients>
    <
client name=”client_obert4” room=”Lobby” />
    <
client name=”client_emily3” room=”Lobby” />
    <
client name=”client_danniele2” room=”Lobby” />
    <
client name=”client_jhon1” room=”Lobby” />
</
clients>



But palabre order Hereby:
Code:

 <clients>
    <
client name=”client_emily3” room=”Lobby” />
    <
client name=”client_danniele2” room=”Lobby” />
    <
client name=”client_robert4” room=”Lobby” />
    <
client name=”client_jhon1” room=”Lobby” />
</
clients>



Help me , how I can solution this problem?
Teank you!
SORRY, website is currently mostly broken due to software changes on the server.
Hope to fix it soon ...

In the meantime you may still download palabre or use the forum