Gtagasje Posted November 16, 2011 Share Posted November 16, 2011 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. Link to comment
Charlie_Jefferson Posted November 16, 2011 Share Posted November 16, 2011 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. Link to comment
TAPL Posted November 16, 2011 Share Posted November 16, 2011 function pmessage(thePlayer, cmd, tarPlayer, ...) msg = table.concat({...}, " ") tplayer = getPlayerFromName(tarPlayer) outputChatBox("Private message from "..getPlayerName(thePlayer).." : "..msg, tplayer) end addCommandHandler("pm", pmessage) Link to comment
Charlie_Jefferson Posted November 16, 2011 Share Posted November 16, 2011 Thanks for correcting my script TAPL. I made a load of mistakes >.>. Haven't scripted in a while. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now