Firespider Posted April 6, 2024 Share Posted April 6, 2024 Hello, I'm currently working on an RP mod and I've started testing it with several people, the only problem is that when they log in, it downloads the MTA mod for them, but they can easily publish it because they can access client.lua, etc. see the script files Link to comment
Spakye Posted April 6, 2024 Share Posted April 6, 2024 (edited) Hello, you can encrypt your script so people cant read it. You can't avoid people downloading client side script since it runs on their pc. As far as i know its the only solution but i could be wrong Edited April 6, 2024 by Spakye 1 Link to comment
FileEX Posted April 6, 2024 Share Posted April 6, 2024 If you don't want the files to be saved on the players disk, set the cache to false in meta.xml. <script src="client.lua" type="client" cache="false" /> 1 Link to comment
Firespider Posted April 14, 2024 Author Share Posted April 14, 2024 Can I also use this cache in server scripts? Link to comment
Firespider Posted April 14, 2024 Author Share Posted April 14, 2024 @FileEX And if i set the Chache false then the player can use the script? Link to comment
FileEX Posted April 14, 2024 Share Posted April 14, 2024 1 hour ago, Firespider said: Can I also use this cache in server scripts? Server-side scripts are not downloaded by players, so setting the cache does not change anything. 36 minutes ago, Firespider said: @FileEX And if i set the Chache false then the player can use the script? Setting the cache means that the script is not downloaded to the player's disk, but is still loaded into memory so that it can run. It can still be manipulated by the client, so you should never trust data from the client. More about it here https://wiki.multitheftauto.com/wiki/Script_security 1 Link to comment
Firespider Posted April 14, 2024 Author Share Posted April 14, 2024 And if i set the pics download false then also save pics in the memory? Link to comment
FileEX Posted April 14, 2024 Share Posted April 14, 2024 If you set images downloading to false, the files will not be downloaded for the client, and the scripts that use these images, e.g. for the GUI, will stop working properly due to the lack of files. If you don't want to save the images to the client's disk, you can keep them on the server and send only the raw data to the client and use it to create a texture for drawing the GUI. You can also consider using SVG, which allows you to easily create images from string data without having to download .svg files to disk 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