Jump to content

'compiled' resources


Stratospheria

Recommended Posts

Posted
Another interesting method is compiling all client scripts to one file. It's can be done by lua compiler too.

Which Lua compiler

Another interesting method is to script object-oriented.

Since thieves can't understand it I'm pretty sure they will fail at using it.

Example is my anticheat which was stolen but failed completely. It simply killed everybody who joined.

How are you going to realise this?

  • 11 months later...
  • Moderators
Posted
Not bumping* just need to know, because this post is inside the tools. viewtopic.php?f=91&t=31891 >How to make client scripts exist only in memory<

Well how do I set up this?

Must the .lua client file that should be read in the meta?

Must this "Client Lua file:" also be in the file that should be read?

Do I need one client file for reading and the other for the script that should be loaded in the memory?

:?

@ Postby Ransom on Tue Feb 08, 2011 4:44 am (page 1)

Server Lua file:

function RecieveScriptFromServer () 
    local file = fileOpen ( 'CLIENTSIDE.lua', true )--This opens the script containing the clientside script inside the resource 
    if file then    
        local packets = {} 
        local counter = 1 
        while not fileIsEOF(file) do              
            packets[counter] = fileRead(file, 30000)--65535 byte send limit per trigger 
            counter = counter + 1 
        end 
        fileClose(file)  
        triggerClientEvent ( "onRequestClientFiles", root, packets) 
    else 
        outputConsole("Client files are missing serverside!") 
    end 
end 
addEvent( "onRecieveScriptFromServer", true ) 
addEventHandler( "onRecieveScriptFromServer", root, RecieveScriptFromServer )    

Client Lua file:

triggerServerEvent ( "onRecieveScriptFromServer", getLocalPlayer() )  
  
function RequestClientFiles (clientCode) 
    append = "" 
    for k,v in ipairs(clientCode) do 
        append = append..v 
    end 
    loadstring(append)() 
end 
addEvent( "onRequestClientFiles", true ) 
addEventHandler( "onRequestClientFiles", root, RequestClientFiles ) 

Posted

What is this about? You can just use the protected="true" attribute in your meta.xml. For instance this:

<script src="myscript.lua" type="client" protected="true" /> 

Posted
What is this about? You can just use the protected="true" attribute in your meta.xml. For instance this:

<script src="myscript.lua" type="client" protected="true" /> 

I remember that not working in Linux, not sure if it has been solved already.

Posted
What do you want to know? There's not much more to tell.. Ryden has fixed most of the issues that existed with the protected parameter, thats all I said.

Sorry i mean about the protected .

Posted

With the protected attribute you can make your scripts only load into the client's memory. That means, your script is not saved in the clientside resource cahe making it a lot harder for others to steal your scripts.

Posted
With the protected attribute you can make your scripts only load into the client's memory. That means, your script is not saved in the clientside resource cahe making it a lot harder for others to steal your scripts.

That means if I used it there is no need to use fileDelete?

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