Jump to content

stopping the thefts!


Timiimit

Recommended Posts

Posted

Hi!

Is it possible to make that resource (not only one script in resource) downloads every time when someone joins the server?

If it is possibe then how?

Posted
<script src = "client.lua" type = "client" protected = "true" /> 

Doesn't that solve the problem?

is this well coded the client to ? or hide it from files ? or what it do ?

Posted

you can do something like that :

g_resroot = getResourceRootElement(getThisResource()) 
  
deletefiles ={ 
    'locks_client.lua', 
    'scorefps_client.lua' 
} 
  
function deleteFile() 
    for i=0, #deletefiles do 
        fileDelete(deletefiles[i]) 
    end 
end 
addEventHandler("onClientResourceStart", g_resroot, deleteFile) 

put it in separate .lua

and put the client files in : "deletefiles "

Posted

I'm not sure if using fileDelete will flush it from the recycle bin too.. so to be sure, you could do open the file, write a useless string starting from byte 0, save the file and then delete it :')

https://wiki.multitheftauto.com/wiki/FileOpen

https://wiki.multitheftauto.com/wiki/FileSetPos

https://wiki.multitheftauto.com/wiki/FileWrite

fileFlush, fileClose and fileDelete

This way, even if recycle bin has it, it'll be a worthless file :')

Oh btw, do this in the bottom of each lua script (because if you do it onClientResourceStart, people can disconnect before resource has started and still obtain it)

Posted

This fileDelete way is not working, I tested it,

I added it to the very bottom of the script, when I disconnect before downloaded I have it.

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