Nerses Posted May 20, 2015 Share Posted May 20, 2015 Hello everyone. Guys I have here a problem. I found the script I need. But it's encoded. But the problem in what? When I run this script, it starts to work, but bothers me in this script what is out there when you start the server to display ads from this script. How to make how to lock access to messages in chat? Link to comment
Tomas Posted May 21, 2015 Share Posted May 21, 2015 You can add it to any ACL and so blocking the function outputChatBox to this ACL. Link to comment
Tekken Posted May 21, 2015 Share Posted May 21, 2015 Hello everyone. Guys I have here a problem. I found the script I need. But it's encoded. But the problem in what? When I run this script, it starts to work, but bothers me in this script what is out there when you start the server to display ads from this script. How to make how to lock access to messages in chat? Is encoded that means is COMPILED so you can't do enything to fix that. Link to comment
Nerses Posted May 21, 2015 Author Share Posted May 21, 2015 You can add it to any ACL and so blocking the function outputChatBox to this ACL. a sample can? Link to comment
Nerses Posted May 21, 2015 Author Share Posted May 21, 2015 Hello everyone. Guys I have here a problem. I found the script I need. But it's encoded. But the problem in what? When I run this script, it starts to work, but bothers me in this script what is out there when you start the server to display ads from this script. How to make how to lock access to messages in chat? Is encoded that means is COMPILED so you can't do enything to fix that. nothing is impossible Link to comment
novo Posted May 21, 2015 Share Posted May 21, 2015 Actually, Lua permits you utilizing functions through different files (as long as these are not set as local). So you may simply create one or two (in case both client and server sides contain these) new script files and run them before the main codes by adding them above on the meta file. Once done so, overwrite outputChatBox to your own custom function. local _outputChatBox = outputChatBox function outputChatBox () return true -- in case you do not want to show up any message end function outputChatBox (message, ...) local advertisement = message:lower():find("visit", 1, true) -- pass the text to lowercase and checking whether it contains any desired word return advertisement or _outputChatBox(message, ...) -- returns 'true' only in case previous statement returns so, or either outputs a message (because advertisement will then be equal to false) end Link to comment
Nerses Posted May 21, 2015 Author Share Posted May 21, 2015 Actually, Lua permits you utilizing functions through different files (as long as these are not set as local). So you may simply create one or two (in case both client and server sides contain these) new script files and run them before the main codes by adding them above on the meta file. Once done so, overwrite outputChatBox to your own custom function. local _outputChatBox = outputChatBox function outputChatBox () return true -- in case you do not want to show up any message end function outputChatBox (message, ...) local advertisement = message:lower():find("visit", 1, true) -- pass the text to lowercase and checking whether it contains any desired word return advertisement or _outputChatBox(message, ...) -- returns 'true' only in case previous statement returns so, or either outputs a message (because advertisement will then be equal to false) end That is me right now to create the script above that you brought this code to insert into it and run it? Link to comment
Addlibs Posted May 21, 2015 Share Posted May 21, 2015 Create a LUA file, paste either code found below (change the blacklisted word as appropriate in variant 2), insert the reference of this script in the meta.xml BEFORE the main script. Variant 1: Block the use of outputChatBox completely local _outputChatBox = outputChatBox function outputChatBox () return true end Variant 2: Block the use of outputChatBox is a specific word (default “visit”) is included in the message local _outputChatBox = outputChatBox function outputChatBox (message, ...) local advertisement = message:lower():find("visit", 1, true) -- pass the text to lowercase and checking whether it contains any desired word return advertisement or _outputChatBox(message, ...) -- returns 'true' only in case previous statement returns so, or either outputs a message (because advertisement will then be equal to false) end (Both codes by novo) Link to comment
KariiiM Posted May 21, 2015 Share Posted May 21, 2015 Hello everyone. Guys I have here a problem. I found the script I need. But it's encoded. But the problem in what? When I run this script, it starts to work, but bothers me in this script what is out there when you start the server to display ads from this script. How to make how to lock access to messages in chat? Is encoded that means is COMPILED so you can't do enything to fix that. nothing is impossible But with Complied scripts it kinda impossible to edit it. Link to comment
Addlibs Posted May 22, 2015 Share Posted May 22, 2015 But with Complied scripts it kinda impossible to edit it. You can't edit, but you can create an additional script which modifies how the former one acts. Link to comment
ALw7sH Posted June 14, 2015 Share Posted June 14, 2015 they already gave you not one solution but two 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