This is snippet for getting samp versions(From 0.3.7 R1 - 0.3.7 R4 - 2). You can use it on new cleo extension Cleo Redux: https://re.cleo.li/.
The code contains 2 functions:
- get_samp_version_id
- get_samp_version_name
/*
get_samp_version_id function is reading the "IMAGE_FILE_HEADER" of samp.dll (TimeDateStamp to be specific)
That TimeDateStamp is based on compilation time. See this for more info:
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#file-headers
"TimeDateStamp = The low 32 bits of the number of seconds since 00:00 January 1, 1970 (a C run-time time_t value), that indicates when the file was created. "
In most versions that time stamp is located at offset 0x128 from samp.dll. In...