Jump to content

Compiling .txd, .dff and .col


Recommended Posts

You could delete them after they are loaded, however that would require them to be downloaded every time again. look for file write and file reading functions, there might be a way to write a custom bit encryption which "destroys" the files in a way where only your script can fix them quick and reload them.

Link to comment
@YOGA....

Nobody can use files which aren't downloaded.

https://wiki.multitheftauto.com/wiki/Meta.xml

study more, my friend :lol::lol::lol::lol:NOOB :roll:

Seriously?

How should someone use files which he didn't downloaded? That's impossible if you don't make an own download system.

It's a valid configuration but remember, files will be downloaded but not saved on the client, that means every time a player connect they need to download the file again. Setting download to "true" means saving the file on the clients hard drive.

Link to comment
@YOGA....

Nobody can use files which aren't downloaded.

https://wiki.multitheftauto.com/wiki/Meta.xml

study more, my friend :lol::lol::lol::lol: NOOB :roll:

Why are you calling people noobs? After all, we all know you can't script anything.

My recommendation for this is to just worry about it, because you can't compile the file. The only other way would be to delete the file when the resource is loaded, but then the client would have to download it everytime.

Link to comment
@YOGA....

Nobody can use files which aren't downloaded.

https://wiki.multitheftauto.com/wiki/Meta.xml

study more, my friend :lol::lol::lol::lol: NOOB :roll:

Why are you calling people noobs? After all, we all know you can't script anything.

My recommendation for this is to just worry about it, because you can't compile the file. The only other way would be to delete the file when the resource is loaded, but then the client would have to download it everytime.

:lol: I agree with you in that.

By the way he can use cache as well..

Link to comment

Por que você está chamando as pessoas noobs? Afinal, todos nós sabemos que você não pode script nada. Minha recomendação para isso é só se preocupar com isso, porque você não pode compilar o arquivo. A única outra maneira seria a de excluir o arquivo quando o recurso é carregado, mas, em seguida, o cliente terá de baixá-lo sempre.

Okay, okay

Link to comment

I guess you should perhaps reread the wiki page. The download attribute is not the same as cache - the former tells the server that the file shouldn't be downloaded immediately (as of 1.4, scripts can call downloadFile to download a file with the attribute download set to false), while the latter tells the server to send the data to the client but keep it in memory only, rather than saving it to the client's resource cache, hence the name 'cache'.

Long story short, your answer is completely wrong. Even cache won't do it since it's for script files only.

Link to comment

Por que você está chamando as pessoas noobs? Afinal, todos nós sabemos que você não pode script nada. Minha recomendação para isso é só se preocupar com isso, porque você não pode compilar o arquivo. A única outra maneira seria a de excluir o arquivo quando o recurso é carregado, mas, em seguida, o cliente terá de baixá-lo sempre.

Okay, okay

Seems like your google automatic translation failed.

Link to comment

You can load files to memory and keep the stored in variables/table. Once the resource gets loaded, load the files to memory and remove them from the file system (fileDelete). That will also make the player download the files again when they join the server. That's fine if the files aren't big (~50kb) and if you don't have too many files.

What I mean by load to memory? Simply:

engineLoadDFF 
engineLoadTXD 
engineLoadCOL 

When returned to variable they will stay in memory.

One more thing you can do to protect your .dff files is to select button "lock DFF" in 3DS Max before exporting the model. This is not the safest way to do it because it's simple to remove the lock in a binary file editors.

Link to comment
I think an old buddy of mine told me a while back that FFS Gaming have something similar, using fileRead, fileWrite etc to mess up the file type slightly after it's loaded or something?

As far as I know, this would work, and I see no reason why not.

Maybe you can try making custom functions that slightly modify the file, so it is corrupted when the user loads it. When you want to read the file, load a custom function. You can try the code below, but I'm at school right now so I cannot test it.

function compileThisFile ( file ) 
    local f = fileRead ( file, fileGetSize ( file ) )  
    fileWrite ( file, "__"..tostring(f).."__" ) 
end 
  
function decompileScript ( file ) 
    local text = fileRead ( file, fileGetSize ( file ) ) 
    return text:sub ( 3, text:len ( ) - 3 ) 
end  

Link to comment
  • 7 months later...

there is a way to compile txd, dff, col. I have a compiled files frome some server, i have a client side part of script... I dont know which way files was compiled and I cant understand the logic of the script because i havent server-side part, but I know that there is a way

Link to comment

You can make your files download via the script itself, e.g. triggerLatentClientEvent. This way, you can use teaEncode serverside to encrypt the file, then send it to the client, save it as it is, and use teaDecode when you need to use it in your script. But I think you'll have to create a temporary file which is decoded, so catching and stealing it would still be kinda possible.

Link to comment
You can make your files download via the script itself, e.g. triggerLatentClientEvent. This way, you can use teaEncode serverside to encrypt the file, then send it to the client, save it as it is, and use teaDecode when you need to use it in your script. But I think you'll have to create a temporary file which is decoded, so catching and stealing it would still be kinda possible.

Doesn't matter. Client always has the key.

Link to comment

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