[M]ister Posted July 23, 2014 Share Posted July 23, 2014 Hello I wonder if there is some way in the Lua Language to convert a message backwards. Ex: I love MTA -> ATM evol I I would like to add it in this script: addCommandHandler("text",function(player,command,text) outputChatBox("Text: "..text) end) Link to comment
Bonsai Posted July 23, 2014 Share Posted July 23, 2014 I don't think so, but its easy to write your own function. You could cut the last character of a string and add it to a new one. string.gsub or something, I'm not sure, might be useful. EDIT: Or try string.reverse(s), just found that. Link to comment
[M]ister Posted July 23, 2014 Author Share Posted July 23, 2014 Very thanks Bonsai, worked. addCommandHandler("text",function(player,command,...) text = table.concat ( { ... }, " " ) outputChatBox("Text: "..string.reverse(text)) end) 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