joedajoester Posted February 18, 2012 Share Posted February 18, 2012 function sendMessage2( messageclean, messageType) if message then if(string.find(message, "warp me to"))then local player = gettok ( message, 4, string.byte(' ') ) outputChatBox("warped to "..) executeCommandHandler ( "warp ", source, source ) end end end addEventHandler("onPlayerChat",root,sendMessage2) Can someone help. I get no error. Example: warp me to Thunder-D and it warps me to him and says i have been warped to thunder-d. Thanks Link to comment
Castillo Posted February 18, 2012 Share Posted February 18, 2012 function sendMessage2( message, messageType) if message then if(string.find(message, "warp me to"))then local player = gettok ( message, 4, string.byte(' ') ) outputChatBox("warped to ".. player) executeCommandHandler ( "warp", source, player ) end end end addEventHandler("onPlayerChat",root,sendMessage2) 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