Fist Posted March 15, 2017 Share Posted March 15, 2017 hey! Is it possible to encode image or model file so people couldn't steal it and when i would need to use it on server i could just decode it through code? Link to comment
MIKI785 Posted March 15, 2017 Share Posted March 15, 2017 Yes it is, https://wiki.multitheftauto.com/wiki/TeaEncode. Link to comment
Fist Posted March 15, 2017 Author Share Posted March 15, 2017 22 minutes ago, MIKI785 said: Yes it is, https://wiki.multitheftauto.com/wiki/TeaEncode. I actually already got it managed to encode/decode but how i could use that encoded image without decoding it into back to image but just using that decoded data ? Link to comment
Moderators Citizen Posted March 15, 2017 Moderators Share Posted March 15, 2017 (edited) You can use dxCreateTexture (the 2nd signature of it) to get a texture out of your variable containing your image data that you can then use with dxDraw functions like a classic image. Make sure you don't loop the texture creation (I mean don't do that in an onClientRender for exemple) or you the client will eventually run out of memory. Edited March 15, 2017 by Citizen 1 Link to comment
Fist Posted March 15, 2017 Author Share Posted March 15, 2017 2 hours ago, Citizen said: You can use dxCreateTexture (the 2nd signature of it) to get a texture out of your variable containing your image data that you can then use with dxDraw functions like a classic image. Make sure you don't loop the texture creation (I mean don't do that in an onClientRender for exemple) or you the client will eventually run out of memory. Thank you! That's what i needed. Link to comment
3aGl3 Posted March 16, 2017 Share Posted March 16, 2017 The wiki states that the engineLoadDFF function also accepts strings of text instead of a filepath. So reading the file, then coding it and calling engineLoadDFF with that data would also work. 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