so I have made an array to store some things
- Code: Select all
ArrayList messages = new ArrayList();
//add the messages
messages.Add("Message1");
messages.Add("Message2");
messages.Add("Message3");
and then I use
- Code: Select all
int r = rnd.Next(messages.Count);
to randomly get one of the messages and then I send a player the randomly selected message
- Code: Select all
Player.SendMessage(p, (string)messages[r]);
and that all works fine but now I have a need to send all the players on the server one of those randomly selected messages and I can't work out how I would send a different message to every player. I have been able to send all the players on the server the same message just not a different message to each individual player.
Any help on this is greatly appreciated