Determine a Client's OS
2 Attachment(s)
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.
I've attached an example that I was playing around with. Thanks to psychonic for providing a Mac cvarlist to work with. |
Re: Determine a Client's OS
Really cool! I'll be using this!
|
Re: Determine a Client's OS
That's far nicer than using javascript in a motd! Thank you!
|
Re: Determine a Client's OS
Nice job, very useful! :)
|
Re: Determine a Client's OS
Why are people doing OS-specific stuff in SourcePawn? Are you insane?
|
Re: Determine a Client's OS
It's really just for fun in my case :) Printing a message to clients about percentage of players which use Mac.
|
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
Oh god what kind of plugin features
|
Re: Determine a Client's OS
banning macosx ppl for example and rewarding linux players
|
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
Quote:
Oh, hey, look, there's BAIL! :P |
Re: Determine a Client's OS
Did anyone bother to read OP? :P
Quote:
|
Re: Determine a Client's OS
Quote:
It's related to the XY Problem. So... why do you need OS statistics? |
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
It's for fun, same reason people use GeoIP in there signatures. It doesn't help anyone to know what city they are in while browsing a forum.
|
Re: Determine a Client's OS
Thanks for this!
|
Re: Determine a Client's OS
Great! it is so useful!
|
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
If I hear or see any plugin doing this I will ban everyone in this thread. Forever.
|
Re: Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
Sure. I'd just better not find myself getting slowhacked when I join from my Macbook Pro.
|
Re: Determine a Client's OS
but I think that a player can avoid the determination by adjusting cvar value... :<
|
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
Thanks !! :D
|
Re: Re: Determine a Client's OS
Quote:
Thanks for your explanation! |
Re: Determine a Client's OS
(Bad) Jokes aside, these same concerns could be applied to the GeoIP extension, or any other information that a server can retrieve from a player. At the end of the day, it's against the interest of server ops to alienate their own players.
|
Re: Determine a Client's OS
If I wasn't clear before, I do not advocate using OS to determine cases for slow hacking or kick/banning based on OS. I'll be really angry if I get banned for this shit.
|
Re: Determine a Client's OS
I will use this for not sending some infomation on console for Linux and Mac players because their console text is a bit weird and doesn't show ASCII art properly.
|
Re: Determine a Client's OS
PHP Code:
|
Re: Determine a Client's OS
Quote:
|
Re: Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
hi, you did greate job=))thanx,but how can i do the same for Amx-X??
|
Re: Determine a Client's OS
Quote:
Install 64 bit non-ubuntu lnux distro Install 32 bit awful version of steam Wait hl2 to load Kill process Launch from command line with whatever switch possible out of desparation Kill proccess once you hear title music Get promo item Reformat |
Re: Determine a Client's OS
I've been using this for a little while, and apparently mac_fsbackground is incorrect, as it doesn't exist (either that, or nobody uses Macs).
This is on TF2, by the way. |
Re: Determine a Client's OS
Quote:
Edit: The linux one is outdated as well. Will check that soon. Edit 2: New Linux-Cvar = "sdl_double_click_size". |
Re: Determine a Client's OS
Updated the example in the first post to use gamedata. I highly recommend using gamedata for this in your plugins, as the client cvars are constantly changing between updates.
|
Re: Determine a Client's OS
Working on getting the updated cvars for L4D2.
Windows still has windows_speaker_config which is pretty much guaranteed to be Windows only. The following exist on Mac and not on Windows. Waiting on a Linux dump to determine once and for all.
|
Re: Determine a Client's OS
Someone here knows if this still works with CS:GO? In CS:S it works fine, I CS:GO it always gives out unknown_os.
|
Re: Determine a Client's OS
Quote:
|
Re: Determine a Client's OS
New gamedata with L4D2 support is in my repo.
|
All times are GMT -4. The time now is 00:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.