Jump to content

script


Nerses

Recommended Posts

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
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
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

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
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

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
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
  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...