DjMixCuma Posted June 20, 2012 Share Posted June 20, 2012 hello, how to detect "." in onplayertext? for example, i want formated msg: say: .hello! output: DJMixCuma: hello! Link to comment
Guest Guest4401 Posted June 20, 2012 Share Posted June 20, 2012 addEventHandler('onPlayerChat',root, function(msg,msgtype) if msgtype == 0 then outputChatBox(getPlayerName(source)..": #e7dbad"..msg:gsub("%.",""),root,255,255,255,true) cancelEvent() end end ) local text = "abcd.efg.hi" string.gsub(text,"%.","") --> abcdefghi [string] text:gsub("%.","") --> abcdefghi [string] Link to comment
DjMixCuma Posted June 20, 2012 Author Share Posted June 20, 2012 Ok thx but when i write .Hello i see: DJMixCuma says: Hello DJMixCuma: Hello How to disable "DJMixCuma", not "DJMixCuma says": ?? Link to comment
top sniper Posted June 20, 2012 Share Posted June 20, 2012 Ok thx but when i write.Hello i see: DJMixCuma says: Hello DJMixCuma: Hello How to disable "DJMixCuma", not "DJMixCuma says": ?? https://wiki.multitheftauto.com/wiki/CancelEvent 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