ID:264620
 
Code:
PM(M as mob,msg as text)
name = "Private Message"
if(muted==1)
usr << "<B><font color=Red>You are muted!</B>"
else
M << "[key]: [msg]"


Problem description: I want the list of mobs that show up as ONLY players that are logged into the world, not to include any mobs such as NPCs

If you had used the forum search, you would've found out that to do so you need to supply the verb argument or input() with a list of the specific desired choices (such as all the logged in players). That list could be made on the spot or pre-made.
PM()
if(muted)
src << "You're muted!"
return

var/list/people = new()
for(var/client/C) people += C

var/client/recipient = input("Send PM to who?","PM") as null|anything in people
if(recipient)
var/msg = input("Enter your PM:","PM") as null|text
if(msg) recipient << "[key]: [msg]"
In response to Nielz
There's no need to actually make that an associative list to get that result, mind.
In response to Kaioken
Edited.