Raised This Month: $51 Target: $400
 12% 

Get client engine version


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-10-2008 , 05:44   Get client engine version
Reply With Quote #1

how scripting Get client engine version?
or Send to client request (for example version) and Get response?

thx for response

Last edited by Dionys; 12-10-2008 at 05:54.
Dionys is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-10-2008 , 06:00   Re: Get client engine version
Reply With Quote #2

Sorry but what you mean by engine version? If there's a convar that says it you could use QueryClientConVar.
Sammy-ROCK! is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-10-2008 , 06:32   Re: Get client engine version
Reply With Quote #3

2Sammy-ROCK!
thx!
It will work...

I have found very poor description use of this function. And my experience does not suffice also.
now i need example of use of function QueryClientConVar

For example I wish to transfer in a variable second string of the response to version command of the client.
Dionys is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-10-2008 , 06:43   Re: Get client engine version
Reply With Quote #4

http://docs.sourcemod.net/api/
Console > QueryClientConVar
WoZeR posted an example last year*

Use that link for higher knownledge of the functions.
Sammy-ROCK! is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-10-2008 , 06:50   Re: Get client engine version
Reply With Quote #5

Code:
public Action:Event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
 {
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    QueryClientConVar(client, "version", ConVarQueryFinished:ClientConVar, client);

    return Plugin_Continue;
}

public ClientConVar(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
{
     PrintToChat(client, "\x04[SM] %s = %s", cvarName, cvarValue);
}

dont working for version cvar
cvarValue stay is empty

Last edited by Dionys; 12-10-2008 at 07:54.
Dionys is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-10-2008 , 11:42   Re: Get client engine version
Reply With Quote #6

"version" is a command, not a cvar.
bl4nk is offline
The JCS
AlliedModders Donor
Join Date: Jan 2007
Location: Brazil
Old 12-10-2008 , 11:49   Re: Get client engine version
Reply With Quote #7

client version should not be the same as server? o.0
The JCS is offline
Send a message via MSN to The JCS
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-10-2008 , 13:50   Re: Get client engine version
Reply With Quote #8

Quote:
Originally Posted by The JCS View Post
client version should not be the same as server? o.0
yes
Dionys is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-10-2008 , 14:34   Re: Get client engine version
Reply With Quote #9

Don't clients get kicked if their version differs?
bl4nk is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-10-2008 , 15:35   Re: Get client engine version
Reply With Quote #10

bl4nk is it possible to get command's reply from client?
Sammy-ROCK! 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 02:31.


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