Mimimiguel Posted May 22, 2019 Share Posted May 22, 2019 Hello! I've just seen the news of MTA dropping XP and Vista, in what I guess, will be the next version of the client. I was wondering if there's any way to obtain the operating system of an user, so I could specifically notify them ingame, and also collect data of how many of my userbase will be affected by this change. Thanks in advance! Link to comment
Moderators Patrick Posted May 22, 2019 Moderators Share Posted May 22, 2019 https://wiki.multitheftauto.com/wiki/GetVersion Link to comment
Mimimiguel Posted May 24, 2019 Author Share Posted May 24, 2019 I'm afraid that the function you mention does not suit this case, it only shows if it is Windows or macOS, not the version of the OS: Executing client-side command: inspect( getVersion() ) Command results: { mta = "1.5.6", name = "MTA:SA Client", number = 342, os = "Windows", sortable = "1.5.6-9.16588.5", tag = "1.5.6-release-16588", type = "Release" } [string] Link to comment
Luxy.c Posted May 28, 2019 Share Posted May 28, 2019 (edited) Why would you need the OS Version number ? I mean you could work with country / regions or even by MTA version number which should be more than enough for your use case Edited May 28, 2019 by Luxy.c Link to comment
Mimimiguel Posted May 30, 2019 Author Share Posted May 30, 2019 How can I know who's using XP or Vista with that information? What I want to obtain is the users who are going to get "discontinued" in the next months. I don't see how region or MTA version number can help me to obtain that info. Thanks for your answer! Link to comment
John Smith Posted May 30, 2019 Share Posted May 30, 2019 (edited) Well since XP and Vista users are running a separate branch of MTA, their version would probably contain something along xp-vista in version information. Edited May 30, 2019 by John Smith Link to comment
Scripting Moderators Sarrum Posted May 30, 2019 Scripting Moderators Share Posted May 30, 2019 I see two options: 1) Use CEF and parse the user-agent setting (as the legacy build uses a certain version). 2) Parse the XP/Vista build numbers from https://nightly.multitheftauto.com/ and compare with the client version. 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