Timiimit Posted January 29, 2012 Posted January 29, 2012 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?
SDK Posted January 29, 2012 Posted January 29, 2012 You can delete all the files with fileDelete on onClientResourceStart or an other event.
JR10 Posted January 29, 2012 Posted January 29, 2012 <script src = "client.lua" type = "client" protected = "true" /> Doesn't that solve the problem?
Evil-Cod3r Posted January 29, 2012 Posted January 29, 2012 <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 ?
JR10 Posted January 29, 2012 Posted January 29, 2012 It doesn't save the script file in the client's hard disk. But it's bugged, it was added to meta.xml wiki page, but it's removed now. https://wiki.multitheftauto.com/index.ph ... ldid=29111 https://wiki.multitheftauto.com/index.ph ... ldid=29193
Blaawee Posted January 30, 2012 Posted January 30, 2012 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 "
AGENT_STEELMEAT Posted January 30, 2012 Posted January 30, 2012 It's not bugged, it works just fine...
CapY Posted January 30, 2012 Posted January 30, 2012 It's not bugged, it works just fine... On the Windows.
BinSlayer1 Posted January 30, 2012 Posted January 30, 2012 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)
JR10 Posted January 30, 2012 Posted January 30, 2012 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.
NeXTreme Posted January 30, 2012 Posted January 30, 2012 I use fileDelete method alot, and seems to work just fine. Here's the "tutorial" about it viewtopic.php?f=148&t=36847
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