ID:2881050
 
Code:
proc
GetPlayer(message = "Use this on who?",list/List= world,var/mob/creating_character/Default)
var/list/options = list()
for(var/mob/creating_character/m in List)

if(!m.client || m.name == "????" || !m.name) continue
if(m == usr)
usr << "Nobody is online right now!"
return

var/info = "[m.name] / (Key: [m.key])" //[Statment ? "If True" : "If False"]
if(m == Default) Default = info
options[info] = m
var/mob/M = input("[message] ([length(options)] Players)",,Default) as anything in options
if(!M) return 0
M = options[M]
options = list()
return M


Problem description:
So I've been trying to keep the usr out of the list and it works fine however when you're the only one online it just selects something like "player 0" it'll say on the alert message that I had show [m]'s name. I tried 'break' and 'return' but it just sends the message out and keeps going with the code. Thanks for the help!
usr doesn't belong in a proc. You're using it explicitly, and also implicitly in input(). Both are wrong.
remove all instances of usr, and replace it with src.

Also, your english is a bit broken there. So it's hard to decipher what you're trying to say. Maybe some screenshots will suffice?
So there's no way to stop the person using the verb from seeing their own key? If I use m == m that could also be the target too right?

- Just saw Meme01, will try that ty.
In response to Meme01
So I tried replacing usr with src but it's now just selecting me anyways lol.
Hrm, post some screenshots of what happens.

EDIT: Is this a global proc? If so, then src probably isn't the best solution. What you could also try is passing the mob that initiates the proc as an argument, and simply subtracting them from your list at the start.
I'll post some screenshots soon. It's made for any staff verb that requires you to choose someone like muting, you wouldn't want to mute yourself so I don't want your name in the mix. I will try the argument thing to see if that works.