MAB Posted August 22, 2015 Posted August 22, 2015 how to know if the chat message of a player contains a word? i mean i want to know if the player typed a word between his message to do a function?
JR10 Posted August 22, 2015 Posted August 22, 2015 If you don't mean commands then use onPlayerChat and string.find.
darhal Posted August 22, 2015 Posted August 22, 2015 if u mean commands use this : function test(plr, cmd, ...) text = table.concat({..}, " ") outputChatBox("Some CHAT :" ..text) end addComandHandler("gc", test) -- FOR EXAMPLE /gc
MAB Posted August 22, 2015 Author Posted August 22, 2015 JR i need two things from . 1.example about what u r saying 2. your skype / facebook because i need to talk to u in arabic
JR10 Posted August 23, 2015 Posted August 23, 2015 addEventHandler('onPlayerChat', root, function(msg, type) if (type == 0 and string.find(msg, 'word') then --do something --source here is the player who sent the message end end)
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