Raised This Month: $ Target: $400
 0% 

Get HLDS version


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
johnally
Member
Join Date: May 2011
Location: Mauritius
Old 05-12-2011 , 14:56   Get HLDS version
Reply With Quote #1

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
__________________
No allowed!

johnally is offline
zeus
Senior Member
Join Date: Jul 2008
Old 05-12-2011 , 15:18   Re: Get HLDS version
Reply With Quote #2

The answer is very simple...type version in server console
zeus is offline
johnally
Member
Join Date: May 2011
Location: Mauritius
Old 05-12-2011 , 15:49   Re: Get HLDS version
Reply With Quote #3

What you mean? .. I simulate a server command? How do I retrieve the string then? Thanks,
__________________
No allowed!

johnally is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-12-2011 , 16:21   Re: Get HLDS version
Reply With Quote #4

You need Orpheu here. No choice.
__________________
Arkshine is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 05-12-2011 , 16:21   Re: Get HLDS version
Reply With Quote #5

http://forums.alliedmods.net/showthr...368#post980368
__________________
Impossible is Nothing
Sylwester is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-12-2011 , 16:26   Re: Get HLDS version
Reply With Quote #6

http://forums.alliedmods.net/showpos...&postcount=295
__________________
Arkshine is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-12-2011 , 16:38   Re: Get HLDS version
Reply With Quote #7

Arkshine
You are the one to save the day, once again!
Saved thread in "favourites->scripting tuts"
__________________

SonicSonedit is offline
johnally
Member
Join Date: May 2011
Location: Mauritius
Old 05-12-2011 , 17:13   Re: Get HLDS version
Reply With Quote #8

If I need orpheu, will the function position change depending on protocol?

I'm pretty sure yes .

Thanks for answer!
__________________
No allowed!

johnally is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-12-2011 , 17:27   Re: Get HLDS version
Reply With Quote #9

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.
__________________
hleV is offline
johnally
Member
Join Date: May 2011
Location: Mauritius
Old 05-12-2011 , 17:32   Re: Get HLDS version
Reply With Quote #10

Quote:
Originally Posted by hleV View Post
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

Cheers man,
__________________
No allowed!

johnally is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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