mtasa-blue
mtasa-blue copied to clipboard
Add getSystemInfo function
This function returns basic information about the client's system in a table. Example:
{
CPU = {
MaxClockSpeed = 3200,
NaNumberOfCores = 6,
Name = "AMD Ryzen 5 1600 Six-Core Processor",
NumberOfLogicalProcessors = 12
},
GPU = {
Name = "Radeon RX 570 Series",
RAM = 419328
},
TotalPhysicalMemory = 16727152 -- in bytes. I actually think it should be in MB (as the VRAM size)
}
Note: First call to this function is veeeeeery slow, as it has to query WMI. Subsequent calls are fast, as static variables are used to cache the data.
To clarify, this PR adds:
- CPU info (table under CPU key)
-
TotalPhysicalMemory
- GPU info is just here for convenience (already available from dxGetStatus)