joedajoester Posted January 16, 2012 Share Posted January 16, 2012 whats wrong with this? if string.find(message, "i") and string.find(message, "love") and string.find(message, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end Link to comment
Castillo Posted January 16, 2012 Share Posted January 16, 2012 Show us the full script. Link to comment
joedajoester Posted January 16, 2012 Author Share Posted January 16, 2012 function sendMessage2( messageclean, messageType) if string.find(message, "i") and string.find(message, "love") and string.find(message, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end end Link to comment
Castillo Posted January 16, 2012 Share Posted January 16, 2012 function sendMessage2( messageclean, messageType) if string.find(messageclean, "i") and string.find(messageclean, "love") and string.find(messageclean, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end end Link to comment
joedajoester Posted January 16, 2012 Author Share Posted January 16, 2012 Doesnt work, i get no error, and dont you need a command handler?? function sendMessage2( messageclean, messageType) if string.find(messageclean, "i") and string.find(messageclean, "love") and string.find(messageclean, "bot") then outputChatBox("i love you too!", source, 191, 62, 255) end end Link to comment
Castillo Posted January 16, 2012 Share Posted January 16, 2012 I supposed you was using it with onPlayerChat event. function sendMessage2( messageclean, messageType) if (string.find(messageclean, "i") and string.find(messageclean, "love") and string.find(messageclean, "bot")) then outputChatBox("i love you too!", source, 191, 62, 255) 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