Gallagher Posted May 7, 2014 Share Posted May 7, 2014 hello guys! I did a HuD which has a stock that I would not want anyone to steal. I tried using "jacks.png" cache="false" /> but not deleted the picture. Is there any way to delete the image from the client harddisk? Link to comment
Dealman Posted May 7, 2014 Share Posted May 7, 2014 Haven't tried it but you could check if the file exists as they're disconnecting, if it does, delete it. It's not optimal since they can still get it while the server is running. You can also try to make it private, read this for info. They can still find it - if they know where to look. Other than that I guess you're out of luck since it's very hard to protect images in general. Since they could just take a screenshot while in-game and go from there. Link to comment
JR10 Posted May 7, 2014 Share Posted May 7, 2014 Haven't tried it but you could check if the file exists as they're disconnecting, if it does, delete it. It's not optimal since they can still get it while the server is running. He can also just delete it as soon as the script is loaded by just typing the fileDelete function anywhere in the script file, it will be loaded as soon as the script is ran, bypassing it will still be possible by downloading the image and disconnecting before the script is ran, a bit hard but possible.Another way would be to use fetchRemote on an image on the web and then drawing it for the client, check the wiki page for more info and an example. Link to comment
Moderators IIYAMA Posted May 7, 2014 Moderators Share Posted May 7, 2014 (edited) or just change the image to a texture and delete the file. https://wiki.multitheftauto.com/wiki/CreateTexture https://wiki.multitheftauto.com/wiki/FileDelete Which makes stealing very hard. Before they can copy it, it will be gone. Edited May 7, 2014 by Guest Link to comment
JR10 Posted May 7, 2014 Share Posted May 7, 2014 or just change the image to a texture and delete the file.https://wiki.multitheftauto.com/wiki/CreateTexture https://wiki.multitheftauto.com/wiki/FileDelete This is exactly what was suggested before, deleting the file. But it surely can be bypassed. Link to comment
Gallagher Posted May 7, 2014 Author Share Posted May 7, 2014 already used FileDelete and ended up being robbed it is very easy to get the client-side files before they are deleted Link to comment
JR10 Posted May 7, 2014 Share Posted May 7, 2014 Yes, you can simply disconnect before the script that deletes the file is ran. Best way to do this would be fetching the image content from the web and drawing it. Link to comment
Gallagher Posted May 7, 2014 Author Share Posted May 7, 2014 Yes, you can simply disconnect before the script that deletes the file is ran. Best way to do this would be fetching the image content from the web and drawing it. ve if you can help me. got this from the client side script local screenWidth,screenHeight = guiGetScreenSize() function createText1 ( ) if getElementData(getLocalPlayer(), "grung") >= 4 and getElementData(getLocalPlayer(), "grung") <= 7 then grung1= dxDrawImage(screenWidth * 0.93, screenHeight * 0.85, screenHeight * 0.070, screenHeight * 0.070, "image1.png", 0, 0, 0, tocolor(250, 100,100)) end if getElementData(getLocalPlayer(), "grung") >= 1 and getElementData(getLocalPlayer(), "grung") <= 5 then grung2= dxDrawImage(screenWidth * 0.93, screenHeight * 0.85, screenHeight * 0.070, screenHeight * 0.070, "image2.png", 0, 0, 0, tocolor(250, 150,150)) end end function HandleTheRendering ( ) if render then removeEventHandler ( "onClientRender", root, createText1 ) render = false else addEventHandler ( "onClientRender", root, createText1 ) render = true end end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) bindKey( 'F3', 'down', HandleTheRendering ) as I lay fetch that script? image1 http://1.bp.blogspot.com/-t29gjlF4SKo/U ... 0/icon.png image2: https://fbcdn-profile-a.akamaihd.net/hp ... 7854_t.jpg server function startImageDownload( playerToReceive ) fetchRemote ( "http://1.bp.blogspot.com/-t29gjlF4SKo/U016K2-27-I/AAAAAAAAAH0/xZwrXlbqxos/s1600/icon.png", myCallback, "", false, playerToReceive ) end function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end 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 ) 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 ) Thanks Link to comment
#RooTs Posted May 8, 2014 Share Posted May 8, 2014 by Gallagher on Wed May 07, 2014 9:04 amhello guys! I did a HuD which has a stock that I would not want anyone to steal. I tried using "jacks.png" cache="false" /> Result META.xml <file src="jacks.png" download="false" /> Link to comment
Karuzo Posted May 8, 2014 Share Posted May 8, 2014 That option is only from 1.4+. idk what you're trying to do gallagher since you mixed up server and client sided functions Link to comment
Gallagher Posted May 9, 2014 Author Share Posted May 9, 2014 by Gallagher on Wed May 07, 2014 9:04 amhello guys! I did a HuD which has a stock that I would not want anyone to steal. I tried using "jacks.png" cache="false" /> Result META.xml <file src="jacks.png" download="false" /> dont work Link to comment
undefined Posted May 9, 2014 Share Posted May 9, 2014 That option is only from 1.4+. Im use 1.3.5 but it's not work Link to comment
Arnold-1 Posted May 9, 2014 Share Posted May 9, 2014 Can't you read or smth like that? LOL btw upload it to imgur.com then use the link. Link to comment
Gallagher Posted May 9, 2014 Author Share Posted May 9, 2014 That option is only from 1.4+. mta 1.4 can already be used? Link to comment
Karuzo Posted May 9, 2014 Share Posted May 9, 2014 https://nightly.multitheftauto.com Link to comment
#RooTs Posted May 10, 2014 Share Posted May 10, 2014 you can use this script, test it and see g_resroot = getResourceRootElement(getThisResource()) deletefiles ={ 'image.png', -- images .PNG and .JPG and bipmap and .lua } function deletfile() for i=0, #deletefiles do fileDelete(deletefiles[i]) end end addEventHandler("onClientResourceStart", g_resroot, deleteFile) Link to comment
Arnold-1 Posted May 11, 2014 Share Posted May 11, 2014 you can use this script, test it and see g_resroot = getResourceRootElement(getThisResource()) deletefiles ={ 'image.png', -- images .PNG and .JPG and bipmap and .lua } function deletfile() for i=0, #deletefiles do fileDelete(deletefiles[i]) end end addEventHandler("onClientResourceStart", g_resroot, deleteFile) Ehhhm. this will delete the files on resource start, how can he use them then? Link to comment
Moderators IIYAMA Posted May 11, 2014 Moderators Share Posted May 11, 2014 @ Arnold-1 by making textures of it, but yes he isn't doing that.... Link to comment
#RooTs Posted May 11, 2014 Share Posted May 11, 2014 por Arnold-1 em Dom 11 maio de 2014 08:48srzika escreveu: você pode usar este script, testá-lo e ver g_resroot = getResourceRootElement(getThisResource()) deletefiles ={ 'image.png', -- images .PNG and .JPG and bipmap and .lua } function deletfile() for i=0, #deletefiles do fileDelete(deletefiles[i]) end end addEventHandler("onClientResourceStart", g_resroot, deleteFile) Ehhhm. isso irá apagar os arquivos no início do recurso, como ele pode usá-los, então? not start, after loading. the file it is deleted.. ( you can test, and see the result ) Link to comment
Karuzo Posted May 11, 2014 Share Posted May 11, 2014 That would be completely useless if you don't create a texture of that picture. So you're basically just downloading and deleting it. 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