What I do wrong? I want command to trigger if chat message appear. On lua.
Code:
function onAddChatMessage(text)
if (text == '*Bodyguard Name Surname wants to protect you for $200, type /accept bodyguard to accept.') then
sendCommand('/accept bodyguard')
end
return false
end