Karuzo Posted January 30, 2014 Share Posted January 30, 2014 Hey guys, I wanted to "compile" my images , so people who use leaked scripts , can't use them. But i don't know how i could save my images ... Or is there a way in the meta.xml like : ? Any ideas? Thank you for your replies. Link to comment
Bonsai Posted January 30, 2014 Share Posted January 30, 2014 You could also just lock your server if you don't like people. But I'd would start with file functions. Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 haha funny, i didn't say that i don't like people , i just don't like them who steal scripts. hmm , you mean with fetchRemote ? Link to comment
Bonsai Posted January 30, 2014 Share Posted January 30, 2014 haha funny, i didn't say that i don't like people , i just don't like them who steal scripts.hmm , you mean with fetchRemote ? fileDelete("image.png") Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 and create it if i need it ? wouldn't it be to much work ? Link to comment
Bonsai Posted January 30, 2014 Share Posted January 30, 2014 and create it if i need it ? wouldn't it be to much work ? I don't even know if this works at all. Not sure if the file has to exist the whole time. Wouldn't it be easier to keep your scripts safe? People can still take screenshots if your pictures are that awesome. Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 Hmm, that's true. I've already compiled the script , and set my cache to false. Well if there's no other way its ok. But thank you for your help. Link to comment
xXMADEXx Posted January 30, 2014 Share Posted January 30, 2014 I suppose that you could "compile" it, but you'd proabbly have to make your own library to compile it, as Bansai said, you should just use fileDelete if you want to secure your images. Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 Ye ok , i will try that out Thank you guys. Link to comment
Gallardo9944 Posted January 30, 2014 Share Posted January 30, 2014 (edited) there is another way. You can send the image clientside with triggerLatentClientEvent (use latent instead of default here cause it doesn't block the main traffic!) with the pixels. Here goes the tutorial from wiki: -- SERVER function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, playerToReceive ) end function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end --CLIENT addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) if myTexture then destroyElement( myTexture ) end myTexture = dxCreateTexture( pixels ) end ) addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) This way, the image won't be even saved to the drive. fileDelete doesn't trigger until you finish the download so ANYONE can get your images while downloading. Same with scripts. Edited January 30, 2014 by Guest Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 Oh thank you Gallardo that's what i searched for! Link to comment
Gallardo9944 Posted January 30, 2014 Share Posted January 30, 2014 No problem, anytime. Link to comment
xXMADEXx Posted January 30, 2014 Share Posted January 30, 2014 there is another way. You can send the image clientside with triggerLatentClientEvent (use latent instead of default here cause it doesn't block the main traffic!) with the pixels. Here goes the tutorial from wiki: -- SERVER function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, playerToReceive ) end function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end --CLIENT addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) if myTexture then destroyElement( myTexture ) end myTexture = dxCreateTexture( pixels ) end ) addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) This way, the image won't be even saved to the drive. fileDelete doesn't trigger until you finish the download so ANYONE can get your images while downloading. Same with scripts. This would require the server to download the image every time the function is called, and welll... You'll get some nice lag. Link to comment
Castillo Posted January 30, 2014 Share Posted January 30, 2014 You can add a watermark to your image, is what we are doing with our new designs at my server. Link to comment
Karuzo Posted January 30, 2014 Author Share Posted January 30, 2014 A watermark? Hmm . That's a good idea probably.i think im gonna do that. Link to comment
Renkon Posted January 31, 2014 Share Posted January 31, 2014 Or what you can do is to do a bit ADDITION in each byte of the pixels so that image gets like 'compiled', and when you read it you do REMOVE that bit from each byte. Link to comment
Gallardo9944 Posted January 31, 2014 Share Posted January 31, 2014 @xXMADEXx, if the server has enough network speed, there won't be any lag cause latent events don't block main traffic thus not touching the main thread. So that relies only on host's network bandwidth. 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