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

CS:GO client-side coding question to get game stats


Post New Thread Reply   
 
Thread Tools Display Modes
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 02-01-2015 , 04:59   Re: CS:GO client-side coding question to get game stats
Reply With Quote #11

Quote:
Originally Posted by kadim View Post
which of events are related to the user that is playing, since I receive not only user-relevant events, but all server events.
PHP Code:
bool eventForLocalClient engine->GetPlayerForUserID(event->GetInt("userid")) == engine->GetLocalPlayer(); 
Maybe you could also check if the event has been broadcasted or is local:
PHP Code:
event->IsLocal(); 

Last edited by Chrisber; 02-01-2015 at 05:01.
Chrisber is offline
kadim
Junior Member
Join Date: Jan 2015
Old 02-03-2015 , 03:55   Re: CS:GO client-side coding question to get game stats
Reply With Quote #12

Quote:
Originally Posted by Chrisber View Post
PHP Code:
bool eventForLocalClient engine->GetPlayerForUserID(event->GetInt("userid")) == engine->GetLocalPlayer(); 
Maybe you could also check if the event has been broadcasted or is local:
PHP Code:
event->IsLocal(); 
Where do you take this engine?

The only engine that I can find is this https://developer.valvesoftware.com/wiki/IVEngineServer and it does not have GetPlayerForUserID or GetLocalPlayer functions

Last edited by kadim; 02-03-2015 at 03:55.
kadim is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-03-2015 , 07:45   Re: CS:GO client-side coding question to get game stats
Reply With Quote #13

It's IVEngineClient for the client, surprisingly.
__________________
asherkin is offline
kadim
Junior Member
Join Date: Jan 2015
Old 02-03-2015 , 22:43   Re: CS:GO client-side coding question to get game stats
Reply With Quote #14

Quote:
Originally Posted by asherkin View Post
It's IVEngineClient for the client, surprisingly.

Thank you, was able to get an instance of it using
GET_V_IFACE_CURRENT(GetEngineFactory, clientEngine, IVEngineClient, VENGINE_CLIENT_INTERFACE_VERSION);

in sample_mm plugin. Also there is some information here https://github.com/fwdcp/StatusSpec.
kadim is offline
Reply


Thread Tools
Display Modes

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:07.


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