Author |
Message |
Bassnectar Newbie
Joined: May 08 2011 Posts: 5 Offline
|
Posted: Sun May 08, 2011 11:05 pm Post subject: Python Set list |
|
|
|
|
I was wonder what was holding back sending to a set or list of players using python. I notice in chat.h its noted that there isn't support for it yet, what would it take to get this feature working? |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
|
Back to top |
|
|
Bassnectar Newbie
Joined: May 08 2011 Posts: 5 Offline
|
Posted: Tue May 10, 2011 3:39 pm Post subject: |
|
|
|
|
Oh interesting!
Is there a way to not have to append each player, say I wanted to send to the entire arena? Or would I have to do list.append(p) for each player that enters. and list.remove(p) for when they leave? |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
Posted: Tue May 10, 2011 4:57 pm Post subject: |
|
|
|
|
There is SendArenaMessage and SendArenaSoundMessage:
chat.SendArenaMessage (arena, "bla bla")
chat.SendArenaSoundMessage(arena, asss.SOUND_GIRL, "bla bla")
|
If you want to send a custom message you will have to loop over every player
list = asss.PlayerListType()
def getMyPlayers(p):
if (p.arena == arena):
list.append(p)
asss.for_each_player(getMyPlayers)
chat.SendAnyMessage(list, asss.MSG_SYSOPWARNING, 0, None, "bla bla")
|
|
|
Back to top |
|
|
rose61 Newbie
Age:33 Gender: Joined: Mar 14 2015 Posts: 1 Offline
|
Posted: Sat Mar 14, 2015 11:36 am Post subject: |
|
|
|
|
I wanted to send to the entire arena? Or would I have to do list.append(p) for each player that enters.
__________________
You can easily check out our high quality Testking pmp certificate which prepares you well Testking compass test questions for the You can also get success in real fmuniv.edu with the quality |
|
Back to top |
|
|
|