Jump to content

Check if meta.xml has been modified


'LinKin

Recommended Posts

I do that with settings. But setting's names are defined in meta, therefore, if they are changed, the script will not recognize them.

But it's not settings the only reason why I want to check if the meta.xml is modified.

I want to check if a .lua file has been added/removed in meta also.

.. I don't have a clear idea of how to 'solve' this..

Probably using fileWrite, etc... I'm not sure..

How to compare a file to another?

Link to comment

Yeah.. but how to implement this on MTA?

I can generate the MD5 of the meta.xml and put it somewhere in the script,

but then when the script starts how can I compare the meta.xml against the original meta's MD5 ?

EDIT: Found this: https://wiki.multitheftauto.com/wiki/Md5

So hm yeah.. How can I get the meta.xml text as a string in order to turn it to MD5 and compare it with the original one?

EDIT2: https://wiki.multitheftauto.com/wiki/FileRead But there's an argument (count: The number of bytes you wish to read.) .. Why in the example that argument is 500? I don't really understand it

EDIT3:Ok, I am reading the whole meta.xml but how can I know which number to put in the 'count' argument? I arbitrarily put 100000 (It did read the whole meta.xml) using the returned value of fileGetSize didn't work.

Edited by Guest
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...