AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get HLDS version (https://forums.alliedmods.net/showthread.php?t=156819)

johnally 05-12-2011 14:56

Get HLDS version
 
I need a way to retrieve the hlds version of servers.

e.g version "47/1.1.2.5/3329"

This way I can accommodate the different functionality of my plugin to the various versions and protocols.

Is there anyway of doing this?

I thought of using orpheu. If you know of any good alternative method, I'm hugging you :)

zeus 05-12-2011 15:18

Re: Get HLDS version
 
The answer is very simple...type version in server console

johnally 05-12-2011 15:49

Re: Get HLDS version
 
What you mean? .. I simulate a server command? How do I retrieve the string then? Thanks,

Arkshine 05-12-2011 16:21

Re: Get HLDS version
 
You need Orpheu here. No choice.

Sylwester 05-12-2011 16:21

Re: Get HLDS version
 
http://forums.alliedmods.net/showthr...368#post980368

Arkshine 05-12-2011 16:26

Re: Get HLDS version
 
http://forums.alliedmods.net/showpos...&postcount=295

SonicSonedit 05-12-2011 16:38

Re: Get HLDS version
 
Arkshine
You are the one to save the day, once again!
Saved thread in "favourites->scripting tuts" :3

johnally 05-12-2011 17:13

Re: Get HLDS version
 
If I need orpheu, will the function position change depending on protocol?

I'm pretty sure yes :).

Thanks for answer!

hleV 05-12-2011 17:27

Re: Get HLDS version
 
Well,
Code:
new version[32]; get_cvar_string("sv_version", version, sizeof version - 1); // In my case version = "1.1.2.6,48,4554"
However I believe admins can set this CVAR to whatever value they want, although most wouldn't because there's no point IMO.

johnally 05-12-2011 17:32

Re: Get HLDS version
 
Quote:

Originally Posted by hleV (Post 1468208)
However I believe admins can set this CVAR to whatever value they want, although most wouldn't because there's no point IMO.


Thanks hleV, that is some nice way to do it without orpheu. Getting the cvar is a very good idea :) but I guess some admins will play with it :s.. stupid admins I know of :P

Cheers man,


All times are GMT -4. The time now is 04:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.