Jump to content

stopping the thefts!


Timiimit

Recommended Posts

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 "

Link to comment

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)

Link to comment

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