Jump to content

warp


joedajoester

Recommended Posts

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
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

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...