Page 1 of 1

List all players except menu selector

Posted: Sat Oct 08, 2016 7:22 pm
by Kill
Hello,

I've been trying to do so without success, how is it possible to show all the players in a menu except the player who made the menu selection?

Syntax: Select all

for player in PlayerIter("all"):
my_menu.append(player.name) # Show all the player except the player who made the selection

Re: List all players except menu selector

Posted: Sat Oct 08, 2016 7:38 pm
by iPlayer
Given you have the index of the player who perfomed menu selection, you can do this

Syntax: Select all

for player in PlayerIter("all"):
if player.index != index:
my_menu.append(player.name)

Re: List all players except menu selector

Posted: Sat Oct 08, 2016 7:58 pm
by Kill
iPlayer wrote:Given you have the index of the player who perfomed menu selection, you can do this

Syntax: Select all

for player in PlayerIter("all"):
if player.index != index:
my_menu.append(player.name)



Hmmm, I tried that, but was using the wrong arg... Thanks!