joedajoester Posted January 16, 2012 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
Castillo Posted January 16, 2012 Posted January 16, 2012 Show us the full script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
joedajoester Posted January 16, 2012 Author 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
Castillo Posted January 16, 2012 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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
joedajoester Posted January 16, 2012 Author 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
Castillo Posted January 16, 2012 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) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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