Jump to content

Help


joedajoester

Recommended Posts

For this i get error, bad argument @ excuteCommandHandler expected argument at element 2.

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) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "hate") and string.find(messageclean, "bot")) then 
        outputChatBox("Ill note that", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "hi") and string.find(messageclean, "bot")) then 
        outputChatBox("Hello", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "how") and string.find(messageclean, "are") and string.find(messageclean, "bot")) then 
        outputChatBox("I'm doing great", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then 
     executeCommandHandler ( "sv infernus", playerSource ) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 

Link to comment
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) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "hate") and string.find(messageclean, "bot")) then 
        outputChatBox("Ill note that", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "hi") and string.find(messageclean, "bot")) then 
        outputChatBox("Hello", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "how") and string.find(messageclean, "are") and string.find(messageclean, "bot")) then 
        outputChatBox("I'm doing great", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then 
     executeCommandHandler ( "sv infernus", source ) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 

Link to comment
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) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "hate") and string.find(messageclean, "bot")) then 
        outputChatBox("Ill note that", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "hi") and string.find(messageclean, "bot")) then 
        outputChatBox("Hello", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "how") and string.find(messageclean, "are") and string.find(messageclean, "bot")) then 
        outputChatBox("I'm doing great", source, 191, 62, 255) 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 
  
function sendMessage2( messageclean, messageType) 
    if (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then 
     executeCommandHandler("sv", source, "infernus") 
    end 
end 
addEventHandler("onPlayerChat",root,sendMessage2) 

Link to comment
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) 
    elseif (string.find(messageclean, "i") and string.find(messageclean, "hate") and string.find(messageclean, "bot")) then 
        outputChatBox("Ill note that", source, 191, 62, 255) 
    elseif (string.find(messageclean, "hi") and string.find(messageclean, "bot")) then 
        outputChatBox("Hello", source, 191, 62, 255) 
    elseif (string.find(messageclean, "how") and string.find(messageclean, "are") and string.find(messageclean, "bot")) then 
        outputChatBox("I'm doing great", source, 191, 62, 255) 
    elseif (string.find(messageclean, "i") and string.find(messageclean, "a") and string.find(messageclean, "infernus")) then 
        executeCommandHandler("sv", source, "infernus") 
    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...