ID:161354
 
How would I make it so you can send Private Messages (PM's)?

I want one like how DMO has it. They have a little icon thing before the users name, and you click it to send private messages..

Can someone help me?

I am thinking the little icon thing is an obj..

obj/pm
icon = 'pm.dmi'
Click()
var/bla = input("....
...

mob/verb
Say(msg as text)
view(usr) << "[pm] [usr] says: [msg]"


If I am correct on that, please tell me...
I Think that would be really hard to do o_o; it just sounds hard,I think its easy to put something on the usr's screen,like a HUD, and when they click it they get a list of online players and they pick and go on from there.
In response to Reno Kujika
Reno Kujika wrote:
I Think that would be really hard to do o_o; it just sounds hard,I think its easy to put something on the usr's screen,like a HUD, and when they click it they get a list of online players and they pick and go on from there.

I don't want a hude on the screen. I want a Little Icon thing in the output infront of everyone's name.

Example...

Howey Says: Hello!

When you click that PM button, you write them a Private Message, or "Whisper" to that person.
Html my friend.In the chat do the first line
world<<"<a href=?[src.key]><Image here></a>. [src.name]: [Text]"

client/Topic(href)
for(var/mob/M in world)
if(href == M.key)
//Go on with messageing system
In response to Chibi-Gohan0
This would be an excellent place to use the \ref text macro. I'd suggest using it for the src data for the link. Like so:

world << "<a href='?src=\ref[src];action=whisper'>PMBUTTON</a>"

//because we set the src in the link, control goes to the target's Topic()
mob/Topic(href, href_list)
switch(href_list["action"])
if("whisper")
//get the PM
var/text = input(usr,"blah") as text
src << text


Similar methods could be used to create other actions easily, like trading.