Jump to content

"Private message"


Gtagasje

Recommended Posts

Posted

Hi,

How to make it that if you type like "/inv "playername goes here" the typed nick gets the message?

And how to make it that it sets his elementdata to "inv-ed" if the player types "/invacc" ?

I dont know how to do this, can you help me with the start?

Regards, Gtagasje.

Posted
function pmessage(thePlayer, cmd, tarPlayer, ...) 
  
    msg = table.concat({...}, " ") 
    tplayer = tarPlayer 
    outputChatBox("Private message from " .. thePlayer .. " : " .. msg .., tplayer) 
  
end 
addCommandHandler("pm", pmessage) 

Here's a start which I don't expect to work, since it's too simple. :P

Posted
function pmessage(thePlayer, cmd, tarPlayer, ...) 
    msg = table.concat({...}, " ") 
    tplayer = getPlayerFromName(tarPlayer) 
    outputChatBox("Private message from "..getPlayerName(thePlayer).." : "..msg, tplayer) 
end 
addCommandHandler("pm", pmessage) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...