View Single Post
Author Message
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-19-2013 , 14:16   Determine a Client's OS
Reply With Quote #1

By using QueryClientConVar and checking if these unique convars exist on a client, you can determine which operating system the client is running. Useful for building statistics and other creative ideas.
  • Windows - "windows_speaker_config"
  • Linux - "sdl_double_click_size"
  • Mac - "gl_can_mix_shader_gammas"
See the attached gamedata for the latest cvars known to work. Edit: Dr.Mckay's updated gamedata can be found here.

I've attached an example that I was playing around with. Thanks to psychonic for providing a Mac cvarlist to work with.
Attached Files
File Type: sp Get Plugin or Get Source (detect_os.sp - 932 views - 3.0 KB)
File Type: txt detect_os.games.txt (421 Bytes, 388 views)
__________________

Last edited by GoD-Tony; 05-27-2015 at 10:52.
GoD-Tony is offline